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