| 
 | JGL - The Generic Collection Library for Java | 
All Packages  Class Hierarchy  This Package  Previous  Next  Index
  Class com.objectspace.jgl.functions.MinusNumber
java.lang.Object
   |
   +----com.objectspace.jgl.functions.MinusNumber
  -  public final class MinusNumber
  -  extends Object
  -  implements BinaryFunction
		
MinusNumber is a binary function that assumes that both of its operands are
 instances of Number and returns the second operand subtracted from the first operand.
    -  See Also:
    
-  Number, BigInteger, BigDecimal
   
  -   MinusNumber() MinusNumber()
-   Construct myself to use intValue() for operation.
  
-   MinusNumber(Class) MinusNumber(Class)
-   Construct myself to operate on objects of the given class.
   
  -   execute(Object, Object) execute(Object, Object)
-   Return the result of subtracting the second operand from the first operand.
   
 MinusNumber
MinusNumber
 public MinusNumber()
  -  Construct myself to use intValue() for operation.
 
 MinusNumber
MinusNumber
 public MinusNumber(Class discriminator)
  -  Construct myself to operate on objects of the given class.  The class must
 be derived from java.lang.Number.
   
- 
    -  Parameters:
    
-  discriminator - The class of objects on which I will be operating.
    
-  Throws: IllegalArgumentException
    
-  Throw if discriminator is not an instance of java.lang.Number.
  
 
   
 execute
execute
 public Object execute(Object first,
                       Object second)
  -  Return the result of subtracting the second operand from the first operand.
 Be aware that some floating point conversions are not exact, and may
 cause unexpected results due to rounding.
   
- 
    -  Parameters:
    
-  first - The first operand, which must be an instance of Number.
    -  second - The second operand, which must be an instance of Number.
    
-  Returns:
    
-  first - second
    
-  Throws: InvalidOperationException
    
-  Throw if I don't know how to interpret the values.
  
 
All Packages  Class Hierarchy  This Package  Previous  Next  Index