|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.text.Format
infovis.column.format.CategoricalFormat
public class CategoricalFormat
Format for storing categorical string data in an IntColumn.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.text.Format |
|---|
Format.Field |
| Constructor Summary | |
|---|---|
CategoricalFormat()
Constructor. |
|
CategoricalFormat(String name)
Constructor. |
|
| Method Summary | |
|---|---|
int |
addCategory(String name)
Creates a new index associated with the given name. |
void |
clear()
Clears the association maps. |
boolean |
equals(Object obj)
|
int |
findCategory(String name)
Find a category associated with a name, creating it if it doesn't exist yet. |
StringBuffer |
format(Object obj,
StringBuffer toAppendTo,
FieldPosition pos)
|
Map |
getCategories()
Returns the categories map. |
int |
getCategory(String name)
Get the category associated with a name. |
int |
hashCode()
|
String |
indexCategory(int index)
Returns the category name given its index. |
boolean |
isSeparator(char c)
Select valid characters for categories. |
Object |
parseObject(String source,
ParsePosition pos)
|
void |
putCategory(String name,
int value)
Associate a category name with a value. |
| Methods inherited from class java.text.Format |
|---|
clone, format, formatToCharacterIterator, parseObject |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CategoricalFormat(String name)
name - the categorical format name.public CategoricalFormat()
| Method Detail |
|---|
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Object
public void putCategory(String name,
int value)
name - the category namevalue - the integer value.public int getCategory(String name)
name - the name.
public int findCategory(String name)
name - the category name
public String indexCategory(int index)
index - the category index
public int addCategory(String name)
name - the name
public void clear()
public StringBuffer format(Object obj,
StringBuffer toAppendTo,
FieldPosition pos)
format in class FormatFormat.format(Object, StringBuffer, FieldPosition)public boolean isSeparator(char c)
c - a character
true if the character is a separator.
public Object parseObject(String source,
ParsePosition pos)
parseObject in class FormatFormat.parseObject(String, ParsePosition)public Map getCategories()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||