org.schmant.lang
Class CastingTransformer<T>
java.lang.Object
org.schmant.lang.CastingTransformer<T>
- All Implemented Interfaces:
- ObjectTransformer<T>
- Direct Known Subclasses:
- CastingToStringTransformer
public class CastingTransformer<T>
- extends Object
- implements ObjectTransformer<T>
This transformer transforms objects by just casting them to the target type.
- Since:
- 1.0
- Author:
- Karl Gustafsson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CastingTransformer
public CastingTransformer()
transform
public T transform(Object o)
- Description copied from interface:
ObjectTransformer
- Transform the object to the target type.
- Specified by:
transform
in interface ObjectTransformer<T>
- Parameters:
o
- The object to transform.
- Returns:
- The transformed object.