Class SimpleFormatter<K>

java.lang.Object
org.wildfly.clustering.marshalling.spi.SimpleFormatter<K>
All Implemented Interfaces:
Formatter<K>
Direct Known Subclasses:
DelimitedFormatter

public class SimpleFormatter<K> extends Object implements Formatter<K>
Formatter for keys with a simple string representation.
Author:
Paul Ferraro
  • Constructor Details

  • Method Details

    • getTargetClass

      public Class<K> getTargetClass()
      Description copied from interface: Formatter
      The implementation class of the target key of this format.
      Specified by:
      getTargetClass in interface Formatter<K>
      Returns:
      an implementation class
    • parse

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

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