public final class DoubleRange extends Range
| Constructor and Description |
|---|
DoubleRange(Project prj,
DoubleDesc doubleDesc)
Initializes internal data structures according to maximal number of
integer attributes (given by
DoubleDesc.getMax() -
DoubleDesc.getMin()). |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsDouble(java.lang.Double value)
Returns true, if there is a DoubleAttribute contained in this range which
has the specified value.
|
Attribute |
getAttribute(java.lang.Object obj)
Gets the attribute associated with the specified
Object obj. |
DoubleDesc |
getDesc()
Gets the double description for attributes maintained by this range.
|
java.util.Collection<DoubleAttribute> |
getDoubles()
Gets all values contained in this range.
|
DoubleAttribute |
getDoubleValue(double value)
Returns the DoubleAttribute associated with the given double.
|
SimpleAttribute |
getValue(double value)
Returns an attribute representing the given number.
|
Attribute |
parseValue(java.lang.String string) |
void |
update(java.util.Observable ob,
java.lang.Object o) |
getProject, setProjectpublic DoubleRange(Project prj, DoubleDesc doubleDesc)
DoubleDesc.getMax() -
DoubleDesc.getMin()).prj - the project this range belongs todoubleDesc - the double description for attributes maintained by this rangepublic DoubleDesc getDesc()
public boolean containsDouble(java.lang.Double value)
value - the double to be checkedpublic DoubleAttribute getDoubleValue(double value)
value - the value for which the corresponding DoubleAttribute should be
returnedpublic java.util.Collection<DoubleAttribute> getDoubles()
public Attribute getAttribute(java.lang.Object obj)
Object obj.
obj is expected to be of type Double, Double or String.
Returns result of getDoubleValue(double) if obj is of type
Double, Double result of Project.getSpecialAttribute(String) if obj is
of type SpecialAttribute, else returns null. Is needed for
MultipleRange.getAttribute in class Rangeobj - representing Double or SpecialAttributepublic SimpleAttribute getValue(double value)
getDoubleValue(double).value - the value of the double attribute to 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