Class NullFriendlyConverter<T>

java.lang.Object
org.cyclopsgroup.caff.conversion.NullFriendlyConverter<T>
Type Parameters:
T - Type of value to convert from/to
All Implemented Interfaces:
Converter<T>

public class NullFriendlyConverter<T> extends Object implements Converter<T>
A converter that maps between empty CharSequence and NULL
Author:
Jiaqi Guo
  • Constructor Details

    • NullFriendlyConverter

      public NullFriendlyConverter(Converter<T> proxy)
      Parameters:
      proxy - Internal converter that does actual conversion
  • Method Details

    • fromCharacters

      public T fromCharacters(CharSequence text)
      Specified by:
      fromCharacters in interface Converter<T>
      Parameters:
      text - Character sequence form of value
      Returns:
      Converted result
    • toCharacters

      public CharSequence toCharacters(T value)
      Specified by:
      toCharacters in interface Converter<T>
      Parameters:
      value - Object instance
      Returns:
      Text form of value