GigaSpaces XAP 10.0.1 API

org.openspaces.core.util.numbers
Class DoubleHelper

java.lang.Object
  extended by org.openspaces.core.util.numbers.DoubleHelper
All Implemented Interfaces:
Comparator<Number>, NumberHelper<Double>

public class DoubleHelper
extends Object
implements NumberHelper<Double>

Author:
kimchy

Constructor Summary
DoubleHelper()
           
 
Method Summary
 Double add(Number lhs, Number rhs)
          Adds the two numbers (can be of any Number type) and returns the type result that the number helper handles.
 Double cast(Number n)
          Casts the give Number into the type the number helper handles.
 int compare(Number lhs, Number rhs)
           
 Double div(Number lhs, Number rhs)
          Divides the two numbers (can be of any Number type) and returns the type result that the number helper handles.
 Double MAX_VALUE()
          Returns the maximum number for the specific type the number helper handles.
 Double MIN_VALUE()
          Returns the minimum number for the specific type the number helper handles.
 Double mult(Number lhs, Number rhs)
          Multiplies the two numbers (can be of any Number type) and returns the type result that the number helper handles.
 Double ONE()
          Returns the "ONE" value for the given type.
 Double sub(Number lhs, Number rhs)
          Substracts the two numbers (can be of any Number type) and returns the type result that the number helper handles.
 Double ZERO()
          Returns the "ZERO" value for the given type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

DoubleHelper

public DoubleHelper()
Method Detail

compare

public int compare(Number lhs,
                   Number rhs)
Specified by:
compare in interface Comparator<Number>

add

public Double add(Number lhs,
                  Number rhs)
Description copied from interface: NumberHelper
Adds the two numbers (can be of any Number type) and returns the type result that the number helper handles.

Specified by:
add in interface NumberHelper<Double>

sub

public Double sub(Number lhs,
                  Number rhs)
Description copied from interface: NumberHelper
Substracts the two numbers (can be of any Number type) and returns the type result that the number helper handles.

Specified by:
sub in interface NumberHelper<Double>

mult

public Double mult(Number lhs,
                   Number rhs)
Description copied from interface: NumberHelper
Multiplies the two numbers (can be of any Number type) and returns the type result that the number helper handles.

Specified by:
mult in interface NumberHelper<Double>

div

public Double div(Number lhs,
                  Number rhs)
Description copied from interface: NumberHelper
Divides the two numbers (can be of any Number type) and returns the type result that the number helper handles.

Specified by:
div in interface NumberHelper<Double>

MAX_VALUE

public Double MAX_VALUE()
Description copied from interface: NumberHelper
Returns the maximum number for the specific type the number helper handles.

Specified by:
MAX_VALUE in interface NumberHelper<Double>

MIN_VALUE

public Double MIN_VALUE()
Description copied from interface: NumberHelper
Returns the minimum number for the specific type the number helper handles.

Specified by:
MIN_VALUE in interface NumberHelper<Double>

ONE

public Double ONE()
Description copied from interface: NumberHelper
Returns the "ONE" value for the given type.

Specified by:
ONE in interface NumberHelper<Double>

ZERO

public Double ZERO()
Description copied from interface: NumberHelper
Returns the "ZERO" value for the given type.

Specified by:
ZERO in interface NumberHelper<Double>

cast

public Double cast(Number n)
Description copied from interface: NumberHelper
Casts the give Number into the type the number helper handles.

Specified by:
cast in interface NumberHelper<Double>

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.