Class IdentityConverter<Type>

  • All Implemented Interfaces:
    Converter<Type,​Type>

    public class IdentityConverter<Type>
    extends java.lang.Object
    implements Converter<Type,​Type>
    A simple implementation of Converter that converts an instance to itself.
    Author:
    jschwarz
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Type convert​(Type object)
      Converts the specified object and returns the conversion result.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IdentityConverter

        public IdentityConverter()
    • Method Detail

      • convert

        public Type convert​(Type object)
        Description copied from interface: Converter
        Converts the specified object and returns the conversion result.

        Implementations have to accept null-values without throwing exceptions.

        Specified by:
        convert in interface Converter<Type,​Type>
        Parameters:
        object - object to convert
        Returns:
        the converted object