|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.isti.trinetwatch.ruleset.LevelTagTable
public abstract class LevelTagTable
Class LevelTagTable manages a table of LevelTag objects. A modified hash table implementation is used which allows for both the string 'name' and numeric 'value' fields to be used as search keys.
Field Summary | |
---|---|
protected FifoHashtable |
hTable
|
protected LevelTag[] |
levelTagArray
|
protected static int |
LT_ARRAY_SIZE
|
protected int |
maxTagValue
|
protected int |
minTagValue
|
Constructor Summary | |
---|---|
LevelTagTable()
|
Method Summary | |
---|---|
protected boolean |
add(LevelTag lTag)
Adds LevelTag object to table. |
boolean |
addLevelTag(LevelTag lTag)
Adds LevelTag object to table. |
void |
clear()
Clears all objects in the table. |
boolean |
containsKey(java.lang.String str)
Returns true if the specified key exists in the table. |
protected boolean |
containsValue(LevelTag lTag)
Returns true if the specified LevelTag object exists in the table. |
java.util.Enumeration |
elements()
Returns an enumeration of the LevelTag objects in the table. |
java.lang.String |
encodeFormattedString()
Encodes the table into an ASCII formatted string. |
int |
getMaxTagValue()
Returns the maximum 'LevelTag.getValue()' value in the table. |
int |
getMinTagValue()
Returns the minimum 'LevelTag.getValue()' value in the table. |
java.lang.Object |
getTableSyncObj()
Returns the thread-synchronization object for this table. |
LevelTag |
getTag(int num)
Returns LevelTag object associated with the given numeric value. |
LevelTag |
getTag(java.lang.String str)
Returns LevelTag object associated with the given key. |
java.awt.Color |
getTagColorObj(java.lang.String name,
java.awt.Color defaultObj)
Returns a Color object representing the '.colorRGB' value for the matching tag object in the table. |
char |
getTagSymbolChar(java.lang.String name,
char defaultChar)
Returns a character value representing the symbol value for the matching tag object in the table (stored in the '.colorRGB' member of the tag object). |
java.util.Vector |
getValuesVector()
Returns a new Vector containing the values in the table. |
protected LevelTag |
removeTag(int num)
Removes LevelTag object associated with the given numeric value. |
protected LevelTag |
removeTag(LevelTag lTag)
Removes the given LevelTag object. |
protected LevelTag |
removeTag(java.lang.String str)
Removes LevelTag object associated with the given key. |
void |
replaceTableData(LevelTagTable srcTableObj)
Replaces the data in this table with data from the given table. |
int |
size()
Returns the number of LevelTag objects in the table. |
java.lang.String |
toString()
Returns string representation of object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final int LT_ARRAY_SIZE
protected final FifoHashtable hTable
protected final LevelTag[] levelTagArray
protected int minTagValue
protected int maxTagValue
Constructor Detail |
---|
public LevelTagTable()
Method Detail |
---|
protected boolean add(LevelTag lTag)
lTag
- LevelTag object to be added.
public boolean addLevelTag(LevelTag lTag)
lTag
- LevelTag object to be added.
public LevelTag getTag(java.lang.String str)
str
- a string matching the contents of the 'name' field
of the desired LevelTag object.
public LevelTag getTag(int num)
num
- a number matching the contents of the 'value' field
of the desired LevelTag object.
protected LevelTag removeTag(LevelTag lTag)
lTag
- LevelTag object to be removed.
protected LevelTag removeTag(java.lang.String str)
str
- a string matching the contents of the 'name' field
of the LevelTag object to be removed.
protected LevelTag removeTag(int num)
num
- a number matching the contents of the 'value' field
of the LevelTag object to be removed.
public void clear()
protected boolean containsValue(LevelTag lTag)
lTag
- LevelTag object to check against.
public boolean containsKey(java.lang.String str)
str
- key string to use.
public java.util.Enumeration elements()
public int size()
public java.util.Vector getValuesVector()
public int getMinTagValue()
public int getMaxTagValue()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String encodeFormattedString()
public java.awt.Color getTagColorObj(java.lang.String name, java.awt.Color defaultObj)
name
- the tag name to match in the table.defaultObj
- the default color object to return if a matching
tag object is not found.
public char getTagSymbolChar(java.lang.String name, char defaultChar)
name
- the tag name to match in the table.defaultChar
- the default character value to return if a valid
symbol value cannot be generated.
public java.lang.Object getTableSyncObj()
public void replaceTableData(LevelTagTable srcTableObj)
srcTableObj
- source table to read from.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |