|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.dfki.mycbr.core.casebase.Range
de.dfki.mycbr.core.casebase.SymbolRange
public class SymbolRange
Holds SymbolAttributes for a given SymbolDesc. The SymbolAttributes are initialized during construction. SpecialAttributes have to be handled separately, so that you can have SpecialAttribute instead of SymbolAttributes.
| Constructor Summary | |
|---|---|
SymbolRange(Project prj,
SymbolDesc description,
java.util.Collection<java.lang.String> allowedValues)
Creates one SymbolAttribute object for each String specified by allowedValues. |
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class de.dfki.mycbr.core.casebase.Range |
|---|
getProject, setProject |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public 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 attribute| Method Detail |
|---|
public void initIndexes()
initSymbolAttributes(Collection)
public final SymbolAttribute getSymbolValue(java.lang.String symbol)
symbol - the value for which the corresponding SymbolAttribute should
be returned
SymbolDesc.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 SpecialAttribute
public final java.lang.Integer getIndexOf(SimpleAttribute att)
att - the attribute whose index should be returned
public final SymbolAttribute removeAttribute(java.lang.String symbol)
symbol - the symbol to be removed from this range
public 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 attribute
public 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||