Interface Formatter<K>

All Known Implementing Classes:
BinaryFormatter, DelimitedFormatter, SimpleFormatter

public interface Formatter<K>
Formats a cache key to a string representation and back again.
Author:
Paul Ferraro
  • Method Summary

    Modifier and Type
    Method
    Description
    format(K key)
    Formats the specified key to a string representation.
    The implementation class of the target key of this format.
    parse(String value)
    Parses the key from the specified string.
  • Method Details

    • getTargetClass

      Class<K> getTargetClass()
      The implementation class of the target key of this format.
      Returns:
      an implementation class
    • parse

      K parse(String value)
      Parses the key from the specified string.
      Parameters:
      value - a string representation of the key
      Returns:
      the parsed key
    • format

      String format(K key)
      Formats the specified key to a string representation.
      Parameters:
      key - a key to format
      Returns:
      a string representation of the specified key.