net.sf.jga.fn.arithmetic

Class ArithmeticFactory

public class ArithmeticFactory extends Object

Builds and distributes implementations of the Arithmetic and IntegerArithmetic interfaces that are available for supported Number classes.

Copyright © 2003 David A. Hall

Author: David A. Hall

Method Summary
static Arithmetic<Number>getArithmetic(Class c)
Returns the Arithmetic implementation registered for the given class
static IntegerArithmetic<Number>getIntegralArithmetic(Class c)
Returns the IntegerArithmetic implementation registered for the given class
static voidregister(Class c, Arithmetic<Number> math)
Registers the Arithmetic implementation for the given class
static voidregister(Class c, IntegerArithmetic<Number> math)
Registers the IntegerArithmetic implementation for the given class

Method Detail

getArithmetic

public static Arithmetic<Number> getArithmetic(Class c)
Returns the Arithmetic implementation registered for the given class

Returns: the Arithmetic implementation registered for the given class

getIntegralArithmetic

public static IntegerArithmetic<Number> getIntegralArithmetic(Class c)
Returns the IntegerArithmetic implementation registered for the given class

Returns: the IntegerArithmetic implementation registered for the given class

register

public static void register(Class c, Arithmetic<Number> math)
Registers the Arithmetic implementation for the given class

register

public static void register(Class c, IntegerArithmetic<Number> math)
Registers the IntegerArithmetic implementation for the given class