|
||||||||||
| 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.IntegerRange
public final class IntegerRange
Holds IntegerAttributes for a given IntegerDescription. Each time an integer is used in a case the IntegerRange returns a reference to the corresponding IntegerAttribute object or creates a new one. SpecialAttributes are also handled for each SpecialAttribute used in the current project
| Constructor Summary | |
|---|---|
IntegerRange(Project prj,
IntegerDesc d)
Initializes internal data structures according to maximal Integer of integer attributes (given by IntegerDesc.getMax() -
IntegerDesc.getMin()). |
|
| Method Summary | |
|---|---|
boolean |
containsInteger(java.lang.Integer value)
Returns true, if there is a IntegerAttribute object contained in this range, false otherwise. |
Attribute |
getAttribute(java.lang.Object obj)
Gets the attribute associated with the specified Object obj. |
IntegerDesc |
getDesc()
Gets the integer description of the attributes maintained by this range. |
java.util.HashMap<java.lang.Integer,IntegerAttribute> |
getIntegers()
Gets the map which associates an IntegerAttribute object with each integer used as value. |
IntegerAttribute |
getIntegerValue(int value)
Returns the IntegerAttribute associated with the given value. |
SimpleAttribute |
getValue(int v)
Returns the attribute for the given Integer. |
Attribute |
parseValue(java.lang.String string)
|
void |
update(java.util.Observable ob,
java.lang.Object o)
|
| 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 IntegerRange(Project prj,
IntegerDesc d)
IntegerDesc.getMax() -
IntegerDesc.getMin()).
prj - the project this range belongs tod - the integer description for attributes maintained by this
range| Method Detail |
|---|
public IntegerDesc getDesc()
public boolean containsInteger(java.lang.Integer value)
value - the integer value to be checked
public IntegerAttribute getIntegerValue(int value)
IntegerDesc.getMin() and IntegerDesc.getMin() of
the given integer description.
value - the value for which the corresponding IntegerAttribute should
be returned
public java.util.HashMap<java.lang.Integer,IntegerAttribute> getIntegers()
public Attribute getAttribute(java.lang.Object obj)
Object obj.
obj is expected to be of type Integer or String
. Returns result of getIntegerValue(int) if obj is of type
Integer, result of Project.getSpecialAttribute(String) if obj
is of type SpecialAttribute, else returns null. Is needed for
MultipleRange.
getAttribute in class Rangeobj - representing Integer or SpecialAttribute
public SimpleAttribute getValue(int v)
v - an attribute with this value should be returned
public void update(java.util.Observable ob,
java.lang.Object o)
public Attribute parseValue(java.lang.String string)
string - the string which should be used for parsing
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||