infovis.column.format
Class BooleanFormat

java.lang.Object
  extended by java.text.Format
      extended by infovis.column.format.BooleanFormat
All Implemented Interfaces:
Serializable, Cloneable

public class BooleanFormat
extends Format

Format for boolean columns.

Version:
$Revision: 1.5 $
Author:
Jean-Daniel Fekete
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.text.Format
Format.Field
 
Field Summary
static String[] NO_STRING
          List of names for the value FALSE.
static String[] YES_STRING
          List of names for the value TRUE.
 
Constructor Summary
BooleanFormat()
          Constructor.
 
Method Summary
 void addNoString(String no)
          Adds a new name for the NO value.
 void addYesString(String yes)
          Adds a new name for the YES value.
 StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos)
          
static BooleanFormat getInstance()
          Returns an instance of that format.
 Object parseObject(String source, ParsePosition pos)
          
static BooleanFormat setInstance(BooleanFormat format)
          Sets the instance of that format.
 
Methods inherited from class java.text.Format
clone, format, formatToCharacterIterator, parseObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

YES_STRING

public static final String[] YES_STRING
List of names for the value TRUE.


NO_STRING

public static final String[] NO_STRING
List of names for the value FALSE.

Constructor Detail

BooleanFormat

public BooleanFormat()
Constructor.

Method Detail

getInstance

public static BooleanFormat getInstance()
Returns an instance of that format.

Returns:
an instance of that format

setInstance

public static BooleanFormat setInstance(BooleanFormat format)
Sets the instance of that format.

Parameters:
format - the format
Returns:
the old format

parseObject

public Object parseObject(String source,
                          ParsePosition pos)

Specified by:
parseObject in class Format

addYesString

public void addYesString(String yes)
Adds a new name for the YES value.

Parameters:
yes - the new name.

addNoString

public void addNoString(String no)
Adds a new name for the NO value.

Parameters:
no - the new name

format

public StringBuffer format(Object obj,
                           StringBuffer toAppendTo,
                           FieldPosition pos)

Specified by:
format in class Format


Copyright 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.