org.schmant.lang
Class CastingTransformer<T>

java.lang.Object
  extended by 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

Constructor Summary
CastingTransformer()
           
 
Method Summary
 T transform(Object o)
          Transform the object to the target type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CastingTransformer

public CastingTransformer()
Method Detail

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.