All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class improv.actor.behavior.CombinedCriteria

java.lang.Object
   |
   +----improv.event.ImprovObservable
           |
           +----improv.actor.behavior.ImprovProperty
                   |
                   +----improv.actor.behavior.CombinedCriteria

public final class CombinedCriteria
extends ImprovProperty
implements PropertyReference
The CombinedCriteria object is used in to combine the results of multiple criteria, and control their respective influence over the final value.


Variable Index

 o ADD
 o AVG
 o DIV
 o MAX
 o MIN
 o MLT
 o POW
 o SUB

Constructor Index

 o CombinedCriteria(String, PropertyReference[], float[], int)
Constructs a CombinedCriteria Object given a name(when used as a property) an array of PropertyReferences, an array of weights associated with the PropertyReferences and a composite type.

Method Index

 o addCriteria(PropertyReference, float)
Used to add a Criteria.
 o getProperty(PropertyContainer)
Constructs an SFFloatProperty whose value is a rating of the PropertyContainer argument, and
 o rate(PropertyContainer)

Variables

 o ADD
 public static final int ADD
 o SUB
 public static final int SUB
 o MLT
 public static final int MLT
 o DIV
 public static final int DIV
 o MIN
 public static final int MIN
 o MAX
 public static final int MAX
 o AVG
 public static final int AVG
 o POW
 public static final int POW

Constructors

 o CombinedCriteria
 public CombinedCriteria(String s,
                         PropertyReference p[],
                         float weights[],
                         int type)
Constructs a CombinedCriteria Object given a name(when used as a property) an array of PropertyReferences, an array of weights associated with the PropertyReferences and a composite type.

Methods

 o getProperty
 public ImprovProperty getProperty(PropertyContainer p)
Constructs an SFFloatProperty whose value is a rating of the PropertyContainer argument, and @return it as an ImprovProperty

Overrides:
getProperty in class ImprovProperty
 o addCriteria
 public void addCriteria(PropertyReference p,
                         float infl)
Used to add a Criteria.

 o rate
 public double rate(PropertyContainer p)
Returns:
the rating of the PropertyContainer, based on the criteria.

All Packages  Class Hierarchy  This Package  Previous  Next  Index