ma.glasnost.orika.converter.builtin
Class NumericConverters.BigIntegerToLongConverter
java.lang.Object
ma.glasnost.orika.CustomConverter<Object,Object>
ma.glasnost.orika.converter.BidirectionalConverter<BigInteger,Long>
ma.glasnost.orika.converter.builtin.NumericConverters.BigIntegerToLongConverter
- All Implemented Interfaces:
- Converter<Object,Object>, MappedTypePair<Object,Object>
- Enclosing class:
- NumericConverters
public static class NumericConverters.BigIntegerToLongConverter
- extends BidirectionalConverter<BigInteger,Long>
Provides conversion between BigInteger and Long.
- Author:
- matt.deboer@gmail.com
- See Also:
BigInteger
NumericConverters.BigIntegerToLongConverter
public NumericConverters.BigIntegerToLongConverter(boolean truncate)
- Constructs a new BigIntegerToLongConverter, with the configured truncation behavior.
- Parameters:
truncate - specifies whether the converter should perform truncation; if false,
an ArithmeticException is thrown for a value which is too large or too small to be
accurately represented by java.lang.Long
convertTo
public Long convertTo(BigInteger source,
Type<Long> destinationType)
- Specified by:
convertTo in class BidirectionalConverter<BigInteger,Long>
convertFrom
public BigInteger convertFrom(Long source,
Type<BigInteger> destinationType)
- Specified by:
convertFrom in class BidirectionalConverter<BigInteger,Long>
Copyright © 2013 Glasnost. All Rights Reserved.