|
||||||||||
| 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.FloatRange
public final class FloatRange
Holds FloatAttributes for a given FloatDescription. Each time a float is used in a case the FloatRange returns a reference to the corresponding FloatAttribute object or creates a new one. SpecialAttributes are also handled for each SpecialAttribute used in the current project
| Constructor Summary | |
|---|---|
FloatRange(Project prj,
FloatDesc floatDesc)
Initializes internal data structures according to maximal number of integer attributes (given by FloatDesc.getMax() -
FloatDesc.getMin()). |
|
| Method Summary | |
|---|---|
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)
|
| 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 FloatRange(Project prj,
FloatDesc floatDesc)
FloatDesc.getMax() -
FloatDesc.getMin()).
prj - the project this range belongs tofloatDesc - the float description for attributes maintained by this range| Method Detail |
|---|
public FloatDesc getDesc()
public boolean containsFloat(java.lang.Float value)
value - the float to be checked
public FloatAttribute getFloatValue(float value)
value - the value for which the corresponding FloatAttribute should be
returned
public FloatAttribute getDoubleValue(double dValue)
dValue - the value for which the corresponding FloatAttribute should be
returned
public 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 SpecialAttribute
public SimpleAttribute getValue(float value)
getFloatValue(float).
value - the value of the float attribute to 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 | |||||||||