2.8.1: 2008-09-10

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

All Known Implementing Classes:
BooleanFormatter, ColorFormatter, DateFormatter, ExtendedPropertyFormatter, IntegerFormatter, MultiFormatter, NumberFormatter, SpotImageFormatter, StringFormatter, ToStringFormatter

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-05 17:16:27 +0200 (Fri, 05 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.8.1: 2008-09-10