All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class COM.objectspace.jgl.NegativeNumber

java.lang.Object
   |
   +----COM.objectspace.jgl.NegativeNumber

public class NegativeNumber
extends Object
implements UnaryPredicate
NegativeNumber is a unary predicate that assumes that its operand is an instance of Number and returns true if it is negative.

Version:
2.0.2
Author:
ObjectSpace, Inc.
See Also:
Number, BigInteger, BigDecimal

Constructor Index

 o NegativeNumber()
Construct myself to use intValue() for comparisons.
 o NegativeNumber(Class)
Construct myself to compare objects of the given class.

Method Index

 o execute(Object)
Return true if the operand is less than zero.

Constructors

 o NegativeNumber
 public NegativeNumber()
Construct myself to use intValue() for comparisons.

 o NegativeNumber
 public NegativeNumber(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.

Methods

 o execute
 public boolean execute(Object object)
Return true if the operand is less 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