de.dfki.mycbr.core.casebase
Class IntervalAttribute

java.lang.Object
  extended by java.util.Observable
      extended by de.dfki.mycbr.core.casebase.Attribute
          extended by de.dfki.mycbr.core.casebase.SimpleAttribute
              extended by de.dfki.mycbr.core.casebase.IntervalAttribute
All Implemented Interfaces:
IExplainable

public final class IntervalAttribute
extends SimpleAttribute

Represents intervals as values in query/case. Objects of this class should only be created by interval ranges to avoid unnecessary objects.

Author:
myCBR Team

Method Summary
 boolean equals(java.lang.Object o)
           
 Pair<java.lang.Number,java.lang.Number> getInterval()
          Gets the value of this attribute.
 java.lang.String getValueAsString()
          Returns a string representation of this attribute's value.
 java.lang.String toString()
          Returns the string representation of this attribute.
 
Methods inherited from class de.dfki.mycbr.core.casebase.SimpleAttribute
getAttributeDesc, getDesc, getExpType, getName, setDesc
 
Methods inherited from class java.util.Observable
addObserver, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInterval

public Pair<java.lang.Number,java.lang.Number> getInterval()
Gets the value of this attribute.

Returns:
the interval representing the value of this attribute

toString

public java.lang.String toString()
Returns the string representation of this attribute.

Overrides:
toString in class java.lang.Object
Returns:
the string representing the value of this attribute

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getValueAsString

public java.lang.String getValueAsString()
Description copied from class: Attribute
Returns a string representation of this attribute's value. Mostly used for saving cases to internal XML file.

Specified by:
getValueAsString in class Attribute
Returns:
the value of this attribute as string