Package org.cyclos.utils.coercion
Class AbstractCoercer<T>
- java.lang.Object
-
- org.cyclos.utils.coercion.AbstractCoercer<T>
-
- All Implemented Interfaces:
Coercer<T>
- Direct Known Subclasses:
BigDecimalCoercer,BigIntegerCoercer,BooleanCoercer,ByteCoercer,DoubleCoercer,FloatCoercer,IntegerCoercer,LongCoercer,NumberCoercer,ShortCoercer,StringCoercer
public abstract class AbstractCoercer<T> extends Object implements Coercer<T>
Base implementation for coercers
-
-
Constructor Summary
Constructors Constructor Description AbstractCoercer(Class toType)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Tcoerce(Object input)Convert the given object into the coercer type.protected abstract TdoCoerce(Object input)Class<T>getToType()Returns the type this coercer handles
-
-
-
Constructor Detail
-
AbstractCoercer
public AbstractCoercer(Class toType)
-
-
Method Detail
-
coerce
public final T coerce(Object input)
Description copied from interface:CoercerConvert the given object into the coercer type. The input is assumed to be non-null.
-
getToType
public final Class<T> getToType()
Description copied from interface:CoercerReturns the type this coercer handles
-
-