common-util

local.tomas.util.collections
Class CastMapping<T>

java.lang.Object
  extended by local.tomas.util.collections.CastMapping<T>
Type Parameters:
T - target type
All Implemented Interfaces:
ObjectMapping<T>

public class CastMapping<T>
extends Object
implements ObjectMapping<T>

Object mapping which casts objects to another type.

Author:
tomas.teubner

Constructor Summary
CastMapping(Class<? extends T> targetClass)
          Construct mapping.
 
Method Summary
 T map(Object obj)
          Map objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CastMapping

public CastMapping(Class<? extends T> targetClass)
Construct mapping.

Parameters:
targetClass - target class
Method Detail

map

public T map(Object obj)
Description copied from interface: ObjectMapping
Map objects.

Specified by:
map in interface ObjectMapping<T>
Parameters:
obj - source object
Returns:
mapped object

common-util

Copyright © 2005-2007 Tomas Teubner. All Rights Reserved.