|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.japaki.basic.NumberTransformer<T>
public abstract class NumberTransformer<T extends Number>
Transforms a number to a specific type value.
Method Summary | ||
---|---|---|
static
|
getInstance(Class<T> type)
Returns a transformer, that transforms instances of the specified class to a number. |
|
boolean |
isRetrievable(Number input)
Indicates if the input value can be converted to type T . |
|
Number |
transform(T input)
Transforms the input value to a number. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.japaki.basic.TwoWayTransformer |
---|
retransform |
Method Detail |
---|
public Number transform(T input)
transform
in interface TwoWayTransformer<T extends Number,Number>
input
- a number of type T
public boolean isRetrievable(Number input)
T
.
isRetrievable
in interface TwoWayTransformer<T extends Number,Number>
input
- the object for which the transformation origin is searched.
true
, iff the input value can be converted to type
T
.public static final <T extends Number> TwoWayTransformer<T,Number> getInstance(Class<T> type)
Integer
, Long
, Float
,
Double
, Byte
, Short
,
AtomicInteger
, AtomicLong
.
type
- type of input parameter to the transformer
NullPointerException
- if type is null
IllegalArgumentException
- if type is not known
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |