local.tomas.i18n
Class BooleanFormat
java.lang.Object
java.text.Format
local.tomas.i18n.BooleanFormat
- All Implemented Interfaces:
- Serializable, Cloneable
public class BooleanFormat
- extends Format
Formatter for boolean values.
- Author:
- tomas.teubner
- See Also:
- Serialized Form
getInstance
public BooleanFormat getInstance(Locale locale)
- Get singleton instance.
- Parameters:
locale - locale required for the instance
- Returns:
- the instance
getAvailableLocales
public static Locale[] getAvailableLocales()
- Get available locales.
- Returns:
- array of available locales
format
public StringBuffer format(Object obj,
StringBuffer toAppendTo,
FieldPosition pos)
- Specified by:
format in class Format
- Throws:
IllegalArgumentException - if object is not Boolean
parseObject
public Object parseObject(String source,
ParsePosition pos)
- Specified by:
parseObject in class Format
parse
public Boolean parse(String source)
throws ParseException
- Parse string containing representation of boolean.
- Parameters:
source - the string
- Returns:
- the boolean value
- Throws:
ParseException
Copyright © 2005-2007 Tomas Teubner. All Rights Reserved.