public class SymbolRange extends Range
| Constructor and Description |
|---|
SymbolRange(Project prj,
SymbolDesc description,
java.util.Collection<java.lang.String> allowedValues)
Creates one SymbolAttribute object for each String specified by
allowedValues.
|
| Modifier and Type | Method and Description |
|---|---|
SymbolAttribute |
addSymbolValue(java.lang.String value) |
Attribute |
getAttribute(java.lang.Object obj)
Gets the attribute associated with the specified
Object obj. |
int |
getHighestIndex() |
java.util.HashMap<SymbolAttribute,java.lang.Integer> |
getIndexes() |
java.lang.Integer |
getIndexOf(SimpleAttribute att)
Returns the index of the given attribute.
|
java.util.HashMap<java.lang.String,SymbolAttribute> |
getSymbols()
Get a map which associates a
SymbolAttribute with each
allowed value for the given attribute description. |
SymbolAttribute |
getSymbolValue(java.lang.String symbol)
Returns the SymbolAttribute associated with the given String.
|
void |
initIndexes()
Initializes the private files indexes.
|
SymbolAttribute |
removeAttribute(java.lang.String symbol)
Removes the SymbolAttribute associated with the given string from this
range.
|
void |
renameSymbol(java.lang.String value,
java.lang.String value2) |
void |
setHighestIndex(int i) |
void |
setIndexes(java.util.HashMap<SymbolAttribute,java.lang.Integer> i) |
void |
update(java.util.Observable o,
java.lang.Object arg) |
getProject, setProjectpublic SymbolRange(Project prj, SymbolDesc description, java.util.Collection<java.lang.String> allowedValues)
prj - the project this range belongs todescription - the symbol description for this attributeallowedValues - the allowed values for this attributepublic void initIndexes()
initSymbolAttributes(Collection)public final SymbolAttribute getSymbolValue(java.lang.String symbol)
symbol - the value for which the corresponding SymbolAttribute should
be returnedSymbolDesc.isAllowedValue(String)public final java.util.HashMap<java.lang.String,SymbolAttribute> getSymbols()
SymbolAttribute with each
allowed value for the given attribute description.SymbolAttribute with stringpublic Attribute getAttribute(java.lang.Object obj)
Object obj.
obj is expected to be of type String. Returns result of
getSymbolValue(String) if obj is of type String,
result of Project.getSpecialAttribute(String) if obj is of type
SpecialAttribute, else returns null. Is needed for
MultipleRange.getAttribute in class Rangeobj - representing String or SpecialAttributepublic final java.lang.Integer getIndexOf(SimpleAttribute att)
att - the attribute whose index should be returnedpublic final SymbolAttribute removeAttribute(java.lang.String symbol)
symbol - the symbol to be removed from this rangepublic void update(java.util.Observable o,
java.lang.Object arg)
public final void renameSymbol(java.lang.String value,
java.lang.String value2)
value - the old name of the symbolvalue2 - the new name of the symbolpublic SymbolAttribute addSymbolValue(java.lang.String value)
value - the value of the new symbol attributepublic final void setIndexes(java.util.HashMap<SymbolAttribute,java.lang.Integer> i)
i - the indexes to setpublic final java.util.HashMap<SymbolAttribute,java.lang.Integer> getIndexes()
public final void setHighestIndex(int i)
i - the highestIndex to setpublic final int getHighestIndex()