public final class FloatRange extends Range
| Constructor and Description |
|---|
FloatRange(Project prj,
FloatDesc floatDesc)
Initializes internal data structures according to maximal number of
integer attributes (given by
FloatDesc.getMax() -
FloatDesc.getMin()). |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsFloat(java.lang.Float value)
Returns true, if there is a FloatAttribute contained in this range which
has the specified value.
|
Attribute |
getAttribute(java.lang.Object obj)
Gets the attribute associated with the specified
Object obj. |
FloatDesc |
getDesc()
Gets the float description for attributes maintained by this range.
|
FloatAttribute |
getDoubleValue(double dValue)
Returns the FloatAttribute associated with the given double.
|
java.util.Collection<FloatAttribute> |
getFloats()
Gets all values contained in this range.
|
FloatAttribute |
getFloatValue(float value)
Returns the FloatAttribute associated with the given float.
|
SimpleAttribute |
getValue(float 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 FloatRange(Project prj, FloatDesc floatDesc)
FloatDesc.getMax() -
FloatDesc.getMin()).prj - the project this range belongs tofloatDesc - the float description for attributes maintained by this rangepublic FloatDesc getDesc()
public boolean containsFloat(java.lang.Float value)
value - the float to be checkedpublic FloatAttribute getFloatValue(float value)
value - the value for which the corresponding FloatAttribute should be
returnedpublic FloatAttribute getDoubleValue(double dValue)
dValue - the value for which the corresponding FloatAttribute should be
returnedpublic java.util.Collection<FloatAttribute> getFloats()
public Attribute getAttribute(java.lang.Object obj)
Object obj.
obj is expected to be of type Float, Double or String.
Returns result of getFloatValue(float) if obj is of type
Float, Double result of Project.getSpecialAttribute(String) if obj is
of type SpecialAttribute, else returns null. Is needed for
MultipleRange.getAttribute in class Rangeobj - representing Float or SpecialAttributepublic SimpleAttribute getValue(float value)
getFloatValue(float).value - the value of the float 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