org.codehaus.groovy.runtime.typehandling
Class FloatingPointMath

java.lang.Object
  extended by org.codehaus.groovy.runtime.typehandling.NumberMath
      extended by org.codehaus.groovy.runtime.typehandling.FloatingPointMath

public class FloatingPointMath
extends NumberMath

FloatingPoint (Double and Float) NumberMath operations

Author:
Steve Goetze

Field Summary
static FloatingPointMath INSTANCE
           
 
Method Summary
protected  Number absImpl(Number number)
           
 Number addImpl(Number left, Number right)
           
 int compareToImpl(Number left, Number right)
           
 Number divideImpl(Number left, Number right)
           
protected  Number modImpl(Number left, Number right)
           
 Number multiplyImpl(Number left, Number right)
           
 Number subtractImpl(Number left, Number right)
           
protected  Number unaryMinusImpl(Number left)
           
 
Methods inherited from class org.codehaus.groovy.runtime.typehandling.NumberMath
abs, add, and, andImpl, compareTo, createUnsupportedException, divide, getMath, intdiv, intdivImpl, isBigDecimal, isBigInteger, isFloatingPoint, isInteger, isLong, leftShift, leftShiftImpl, mod, multiply, or, orImpl, rightShift, rightShiftImpl, rightShiftUnsigned, rightShiftUnsignedImpl, subtract, toBigDecimal, toBigInteger, unaryMinus, xor, xorImpl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final FloatingPointMath INSTANCE
Method Detail

absImpl

protected Number absImpl(Number number)
Specified by:
absImpl in class NumberMath

addImpl

public Number addImpl(Number left,
                      Number right)
Specified by:
addImpl in class NumberMath

subtractImpl

public Number subtractImpl(Number left,
                           Number right)
Specified by:
subtractImpl in class NumberMath

multiplyImpl

public Number multiplyImpl(Number left,
                           Number right)
Specified by:
multiplyImpl in class NumberMath

divideImpl

public Number divideImpl(Number left,
                         Number right)
Specified by:
divideImpl in class NumberMath

compareToImpl

public int compareToImpl(Number left,
                         Number right)
Specified by:
compareToImpl in class NumberMath

modImpl

protected Number modImpl(Number left,
                         Number right)
Overrides:
modImpl in class NumberMath

unaryMinusImpl

protected Number unaryMinusImpl(Number left)
Specified by:
unaryMinusImpl in class NumberMath

Copyright © 2003-2009 The Codehaus. All rights reserved.