2.12.0: 2009-05-27

net.sf.basedb.util.formatter
Interface Formatter<T>

All Known Implementing Classes:
BooleanFormatter, ColorFormatter, DateFormatter, ExportableFieldFormatter, ExtendedPropertyFormatter, IdentifiableFormatter, IntegerFormatter, LookupFormatter, MultiFormatter, NameableFormatter, NumberFormatter, PrefixSuffixFormatter, SpotImageFormatter, StringFormatter, ToStringFormatter, WellCoordinateFormatter

public interface Formatter<T>

A Formatter formats an object to a string suitable for output in a client application. The formatter may optionally also do the reverse, ie. parse a string to an object.

Version:
2.0
Author:
nicklas
Last modified
$Date: 2008-09-11 22:08:14 +0200 (Thu, 11 Sep 2008) $

Method Summary
 String format(T value)
          Format a value by converting it to a string.
 T parseString(String value)
          Parse a string and return a value of the correct type.
 

Method Detail

format

String format(T value)
Format a value by converting it to a string.

Parameters:
value - The value to format
Returns:
A formatted string

parseString

T parseString(String value)
Parse a string and return a value of the correct type.

Parameters:
value - The string to parse
Returns:
An object
Since:
2.2

2.12.0: 2009-05-27