|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Formatter
A lightweight interface for formatting a value and parsing a value from its formatted form.
Method Summary | |
---|---|
java.lang.String |
formatValue(java.lang.Object value)
Format the value. |
java.lang.Object |
parseValue(java.lang.String formattedString,
java.lang.Class targetClass)
Parse the formatted string representation of a value, restoring the value. |
Method Detail |
---|
java.lang.String formatValue(java.lang.Object value) throws java.lang.IllegalArgumentException
value
- the value to format
java.lang.IllegalArgumentException
- the value could not be formattedjava.lang.Object parseValue(java.lang.String formattedString, java.lang.Class targetClass) throws InvalidFormatException
formattedString
- the formatted string representationtargetClass
- the target class to convert the formatted value to
InvalidFormatException
- the string was in an invalid form
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |