Package net.sf.basedb.util.formatter
Interface Formatter<T>
-
- All Known Implementing Classes:
AdaptiveNumberFormatter
,AutoItemExportFormatter
,AutoLinkFormatter
,BioMaterialEventSourceFormatter
,BooleanFormatter
,CollectionFormatter
,ColorFormatter
,DataFileFormatter
,DateFormatter
,EnumFormatter
,ExportableFieldFormatter
,ExtendedPropertyFormatter
,FilePathFormatter
,IdentifiableFormatter
,IntegerFormatter
,ItemTypeFormatter
,LinkedFileFormatter
,LinkedItemFormatter
,LookupFormatter
,MultiFormatter
,NameableFormatter
,NiceFormatter
,NumberFormatFormatter
,NumberFormatter
,PrefixSuffixFormatter
,PropertyFilterFormatter
,StringFormatter
,ToStringFormatter
,ValueTypeFormatter
,WellCoordinateFormatter
public interface Formatter<T>
AFormatter
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: 2010-09-29 11:21:45 +0200 (on, 29 sep 2010) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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. A null input string should (unless otherwise documented by a specific formatter implementation) be allowed and may return null or any other "default" value.- Parameters:
value
- The string to parse- Returns:
- An object
- Since:
- 2.2
-
-