ma.glasnost.orika.converter.builtin
Class NumericConverters.LongToIntegerConverter
java.lang.Object
ma.glasnost.orika.CustomConverter<Object,Object>
ma.glasnost.orika.converter.BidirectionalConverter<Long,Integer>
ma.glasnost.orika.converter.builtin.NumericConverters.LongToIntegerConverter
- All Implemented Interfaces:
- Converter<Object,Object>, MappedTypePair<Object,Object>
- Enclosing class:
- NumericConverters
public static class NumericConverters.LongToIntegerConverter
- extends BidirectionalConverter<Long,Integer>
Provides conversion between Long and Integer
- Author:
- matt.deboer@gmail.com
NumericConverters.LongToIntegerConverter
public NumericConverters.LongToIntegerConverter(boolean truncate)
- Constructs a new LongToIntegerConverter, 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 the smaller of the two types
convertTo
public Integer convertTo(Long source,
Type<Integer> destinationType)
- Specified by:
convertTo in class BidirectionalConverter<Long,Integer>
convertFrom
public Long convertFrom(Integer source,
Type<Long> destinationType)
- Specified by:
convertFrom in class BidirectionalConverter<Long,Integer>
Copyright © 2013 Glasnost. All Rights Reserved.