org.apache.tools.ant.types
Class Quantifier
EnumeratedAttribute for quantifier comparisons. Evaluates a
boolean[]
or raw
true
and
false
counts. Accepts the following values:
- "all"
false
- "each"
false
- "every"
false
- "any"
true
- "some"
true
- "one"
true
- "majority"
true
false
- "most"
true
false
- "none"
true
Quantifier() - Default constructor.
|
Quantifier(String value) - Construct a new Quantifier with the specified value.
|
boolean | evaluate(boolean[] b) - Evaluate a
boolean array.
|
boolean | evaluate(int t, int f) - Evaluate integer
true vs.
|
String[] | getValues() - Return the possible values.
|
MAJORITY
public static final Quantifier MAJORITY
MAJORITY instance
NONE
public static final Quantifier NONE
NONE instance
Quantifier
public Quantifier()
Default constructor.
Quantifier
public Quantifier(String value)
Construct a new Quantifier with the specified value.
value
- the EnumeratedAttribute value.
evaluate
public boolean evaluate(boolean[] b)
Evaluate a boolean
array.
b
- the boolean[]
to evaluate.
- true if the argument fell within the parameters of this Quantifier.
evaluate
public boolean evaluate(int t,
int f)
Evaluate integer true
vs. false
counts.
t
- the number of true
values.f
- the number of false
values.
- true if the arguments fell within the parameters of this Quantifier.
getValues
public String[] getValues()
Return the possible values.
- getValues in interface EnumeratedAttribute
- String[] of EnumeratedAttribute values.