org.omnaest.utils.structure.element.converter
Class ElementConverterIdentitiyCast<FROM,TO>

java.lang.Object
  extended by org.omnaest.utils.structure.element.converter.ElementConverterIdentitiyCast<FROM,TO>
Type Parameters:
FROM -
TO -
All Implemented Interfaces:
Serializable, ElementBidirectionalConverter<FROM,TO>, ElementBidirectionalConverterSerializable<FROM,TO>, ElementConverter<FROM,TO>

public class ElementConverterIdentitiyCast<FROM,TO>
extends Object
implements ElementBidirectionalConverterSerializable<FROM,TO>

Simple ElementBidirectionalConverter implementation which casts the given object and returns it.

Author:
Omnaest
See Also:
ElementBidirectionalConverter, Serialized Form

Constructor Summary
ElementConverterIdentitiyCast()
           
 
Method Summary
 TO convert(FROM element)
          Transforms a single element from one type into another.
 FROM convertBackwards(TO element)
          Converts an element in backwards way
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ElementConverterIdentitiyCast

public ElementConverterIdentitiyCast()
Method Detail

convert

public TO convert(FROM element)
Description copied from interface: ElementConverter
Transforms a single element from one type into another.

Specified by:
convert in interface ElementConverter<FROM,TO>
Returns:
converted element

convertBackwards

public FROM convertBackwards(TO element)
Description copied from interface: ElementBidirectionalConverter
Converts an element in backwards way

Specified by:
convertBackwards in interface ElementBidirectionalConverter<FROM,TO>
Returns:


Copyright © 2013. All Rights Reserved.