All Packages Class Hierarchy This Package Previous Next Index
Class COM.objectspace.jgl.predicates.PositiveNumber
java.lang.Object
|
+----COM.objectspace.jgl.predicates.PositiveNumber
- public class PositiveNumber
- extends Object
- implements UnaryPredicate
PositiveNumber is a unary predicate that assumes that its operand is an
instance of Number and returns true if it is positive.
>p>
- See Also:
- Number, BigInteger, BigDecimal
-
PositiveNumber()
- Construct myself to use intValue() for comparisons.
-
PositiveNumber(Class)
- Construct myself to compare objects of the given class.
-
execute(Object)
- Return true if the operand is greater than zero.
PositiveNumber
public PositiveNumber()
- Construct myself to use intValue() for comparisons.
PositiveNumber
public PositiveNumber(Class discriminator)
- Construct myself to compare objects of the given class. The class must
be derived from java.lang.Number.
- Parameters:
- discriminator - The class of objects that I will be comparing.
- Throws: IllegalArgumentException
- Throw if discriminator is not an instance of java.lang.Number.
execute
public boolean execute(Object object)
- Return true if the operand is greater than zero.
Be aware that some floating point conversions are not exact, and may
cause unexpected results due to rounding.
- Parameters:
- object - The operand, which must be a Number.
- Returns:
- object > 0
- Throws: InvalidOperationException
- Throw if I don't know how to interpret the values.
All Packages Class Hierarchy This Package Previous Next Index