public final class IntegerRange extends Range
| Constructor and Description |
|---|
IntegerRange(Project prj,
IntegerDesc d)
Initializes internal data structures according to maximal Integer of
integer attributes (given by
IntegerDesc.getMax() -
IntegerDesc.getMin()). |
| Modifier and Type | Method and Description |
|---|---|
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) |
getProject, setProjectpublic IntegerRange(Project prj, IntegerDesc d)
IntegerDesc.getMax() -
IntegerDesc.getMin()).prj - the project this range belongs tod - the integer description for attributes maintained by this
rangepublic IntegerDesc getDesc()
public boolean containsInteger(java.lang.Integer value)
value - the integer value to be checkedpublic IntegerAttribute getIntegerValue(int value)
IntegerDesc.getMin() and IntegerDesc.getMin() of
the given integer description.value - the value for which the corresponding IntegerAttribute should
be returnedpublic 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 SpecialAttributepublic SimpleAttribute getValue(int v)
v - an attribute with this value should be returnedpublic 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