de.dfki.mycbr.core.casebase
Class Range

java.lang.Object
  extended by de.dfki.mycbr.core.casebase.Range
All Implemented Interfaces:
java.util.Observer
Direct Known Subclasses:
ConceptRange, DateRange, DoubleRange, FloatRange, IntegerRange, IntervalRange, StringRange, SymbolRange

public abstract class Range
extends java.lang.Object
implements java.util.Observer

Interface to be implemented by containers of attribute values. Is of great importance for multiple attributes.

Author:
myCBR Team

Constructor Summary
Range(Project p)
           
 
Method Summary
abstract  Attribute getAttribute(java.lang.Object obj)
          Gets the attribute associated with the specified Object obj.
 Project getProject()
           
 void setProject(Project p)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Observer
update
 

Constructor Detail

Range

public Range(Project p)
Parameters:
p - the project this range belongs to.
Method Detail

getAttribute

public abstract Attribute getAttribute(java.lang.Object obj)
                                throws java.text.ParseException
Gets the attribute associated with the specified Object obj. obj is expected to be of a certain type (dependent on AttributeDesc object of class implementing this interface) or SpecialAttribute (represented by a string). Should return result of Project.getSpecialAttribute(String) if obj is a special attribute, a corresponding attribute for the description if obj is of the expected type, else null.

Parameters:
obj - the object for which the corresponding attribute should be returned
Returns:
Attribute that corresponds to obj, null if there is no such Attribute
Throws:
java.text.ParseException - if obj does not fit description

setProject

public final void setProject(Project p)
Parameters:
p - the project to set

getProject

public final Project getProject()
Returns:
the prj