Class ExtendedPropertyFormatter<T>

java.lang.Object
net.sf.basedb.clients.web.formatter.ExtendedPropertyFormatter<T>
All Implemented Interfaces:
Formatter<T>

public class ExtendedPropertyFormatter<T> extends Object implements Formatter<T>
Formatter for extended property values. The actual property value is formatted by the supplied formatter. This formatter then checks if the extended property should be linked by calling the ExtendedProperty.getUrl(Object) method.
Version:
2.0
Author:
nicklas
Last modified
$Date: 2012-09-21 10:13:29 +0200 (fr, 21 sep 2012) $
  • Field Details

  • Constructor Details

    • ExtendedPropertyFormatter

      public ExtendedPropertyFormatter(ExtendedProperty ep, Formatter<T> valueFormatter)
      Create an extended property formatter.
      Parameters:
      ep - The extended property
      valueFormatter - Formatter to use for the values
  • Method Details

    • format

      public String format(T value)
      Description copied from interface: Formatter
      Format a value by converting it to a string.
      Specified by:
      format in interface Formatter<T>
      Parameters:
      value - The value to format
      Returns:
      A formatted string
    • parseString

      public T parseString(String value)
      Description copied from interface: Formatter
      Parse a string and return a value of the correct type. A null input string should (unless otherwise documented by a specific formatter implementation) be allowed and may return null or any other "default" value.
      Specified by:
      parseString in interface Formatter<T>
      Parameters:
      value - The string to parse
      Returns:
      An object