Class IntegerToBigIntegerDecorator
java.lang.Object
com.singularsys.extensions.field.implementations.FieldDecorator
com.singularsys.extensions.field.implementations.IntegerToBigIntegerDecorator
- All Implemented Interfaces:
FieldI,IntegerConvertor,Serializable
A FieldDecorator which converters Integer/Long/Short to BigIntegers on input,
and optionally BigIntegers to Integers on output when there is no loss of precision.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionIntegerToBigIntegerDecorator(FieldI ring, boolean simplifyResults) If simplifyResults is true any BigInteger result which can be converted to an integer without loss of precision -
Method Summary
Modifier and TypeMethodDescriptionconvertInput(Object in) Attempt to convert the input to a Field method.convertOutput(Object out) Attempt to convert the output from a Field method.
-
Constructor Details
-
IntegerToBigIntegerDecorator
-
IntegerToBigIntegerDecorator
If simplifyResults is true any BigInteger result which can be converted to an integer without loss of precision- Parameters:
ring- base ringsimplifyResults- whether to try to convert real results back to Doubles.
-
-
Method Details
-
convertInput
Description copied from class:FieldDecoratorAttempt to convert the input to a Field method.- Specified by:
convertInputin classFieldDecorator- Parameters:
in-- Returns:
- If appropriate convert
into a different type, otherwise returnin.
-
convertOutput
Description copied from class:FieldDecoratorAttempt to convert the output from a Field method.- Specified by:
convertOutputin classFieldDecorator- Parameters:
out-- Returns:
- If appropriate convert
outto a different type, otherwise returnout.
-