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

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

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

Does not change the type of the element and the value of the element being converted.

Author:
Omnaest
See Also:
Serialized Form

Constructor Summary
ElementConverterIdentityCast()
           
 
Method Summary
 TO convert(FROM from)
          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

ElementConverterIdentityCast

public ElementConverterIdentityCast()
Method Detail

convert

public TO convert(FROM from)
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.