Class Formatter.Provided<T>

java.lang.Object
org.wildfly.clustering.marshalling.Formatter.Provided<T>
Type Parameters:
T - the formatted type
All Implemented Interfaces:
Formatter<T>
Direct Known Subclasses:
EmbeddedCacheManagerGroupMemberSerializer.AddressGroupMemberFormatter, KeyFormatter, LocalEmbeddedCacheManagerGroupMemberFormatter
Enclosing interface:
Formatter<T>

public static class Formatter.Provided<T> extends Object implements Formatter<T>
A formatter decorator.
Author:
Paul Ferraro
  • Constructor Details

    • Provided

      public Provided(Formatter<T> formatter)
      Creates a formatter decorator.
      Parameters:
      formatter - the decorated formatter
  • Method Details

    • getType

      public Class<? extends T> getType()
      Description copied from interface: Formatter
      Returns the type of the formatted object.
      Specified by:
      getType in interface Formatter<T>
      Returns:
      the type of the formatted object.
    • parse

      public T parse(String value)
      Description copied from interface: Formatter
      Parses the key from the specified string.
      Specified by:
      parse in interface Formatter<T>
      Parameters:
      value - a string representation of the key
      Returns:
      the parsed key
    • format

      public String format(T value)
      Description copied from interface: Formatter
      Formats the specified key to a string representation.
      Specified by:
      format in interface Formatter<T>
      Parameters:
      value - a key to format
      Returns:
      a string representation of the specified key.
    • wrap

      public <U> Formatter<U> wrap(Class<? extends U> type, Function<U,T> unwrapper, Function<T,U> wrapper)
      Description copied from interface: Formatter
      Returns a wrapped formatter.
      Specified by:
      wrap in interface Formatter<T>
      Type Parameters:
      U - the wrapped type
      Parameters:
      type - the wrapped type
      unwrapper - the unwrapper function
      wrapper - the wrapper function
      Returns:
      a wrapped formmater