Package org.apache.tools.ant.types
Class Quantifier
java.lang.Object
org.apache.tools.ant.types.EnumeratedAttribute
org.apache.tools.ant.types.Quantifier
EnumeratedAttribute for quantifier comparisons. Evaluates a
 
boolean[] or raw true and false
 counts. Accepts the following values:- "all"
- none false
- "each"
- none false
- "every"
- none false
- "any"
- at least one true
- "some"
- at least one true
- "one"
- exactly one true
- "majority"
- more truethanfalse
- "most"
- more truethanfalse
- "none"
- none true
- Since:
- Ant 1.7
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final QuantifierALL instancestatic final QuantifierANY instancestatic final QuantifierMAJORITY instancestatic final QuantifierNONE instancestatic final QuantifierONE instanceFields inherited from class org.apache.tools.ant.types.EnumeratedAttributevalue
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructor.Quantifier(String value) Construct a new Quantifier with the specified value.
- 
Method SummaryMethods inherited from class org.apache.tools.ant.types.EnumeratedAttributecontainsValue, getIndex, getInstance, getValue, indexOfValue, setValue, toString
- 
Field Details- 
ALLALL instance
- 
ANYANY instance
- 
ONEONE instance
- 
MAJORITYMAJORITY instance
- 
NONENONE instance
 
- 
- 
Constructor Details- 
Quantifierpublic Quantifier()Default constructor.
- 
QuantifierConstruct a new Quantifier with the specified value.- Parameters:
- value- the EnumeratedAttribute value.
 
 
- 
- 
Method Details- 
getValuesReturn the possible values.- Specified by:
- getValuesin class- EnumeratedAttribute
- Returns:
- String[] of EnumeratedAttribute values.
 
- 
evaluatepublic boolean evaluate(boolean[] b) Evaluate abooleanarray.- Parameters:
- b- the- boolean[]to evaluate.
- Returns:
- true if the argument fell within the parameters of this Quantifier.
 
- 
evaluatepublic boolean evaluate(int t, int f) Evaluate integertruevs.falsecounts.- Parameters:
- t- the number of- truevalues.
- f- the number of- falsevalues.
- Returns:
- true if the arguments fell within the parameters of this Quantifier.
 
 
-