public static class NumericConverters.IntegerToShortConverter extends BidirectionalConverter<C,D>
destinationType, mapperFacade, sourceType| Constructor and Description |
|---|
IntegerToShortConverter(boolean truncate)
Constructs a new IntegerToShortConverter, with the configured
truncation behavior.
|
| Modifier and Type | Method and Description |
|---|---|
Integer |
convertFrom(Short source,
Type<Integer> destinationType,
MappingContext context) |
Short |
convertTo(Integer source,
Type<Short> destinationType,
MappingContext context) |
boolean |
equals(Object o) |
BidirectionalConverter<D,C> |
reverse() |
String |
toString() |
canConvert, convertgetAType, getBType, hashCode, setMapperFacadeclone, finalize, getClass, notify, notifyAll, wait, wait, waitsetMapperFacadegetAType, getBTypepublic IntegerToShortConverter(boolean truncate)
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 typespublic Short convertTo(Integer source, Type<Short> destinationType, MappingContext context)
convertTo in class BidirectionalConverter<Integer,Short>public Integer convertFrom(Short source, Type<Integer> destinationType, MappingContext context)
convertFrom in class BidirectionalConverter<Integer,Short>public BidirectionalConverter<D,C> reverse()
reverse in class BidirectionalConverter<C,D>public String toString()
toString in class BidirectionalConverter<C,D>public boolean equals(Object o)
equals in class CustomConverter<Object,Object>Copyright © 2016 Glasnost. All rights reserved.