de.dfki.mycbr.core.casebase
Class StringRange
java.lang.Object
de.dfki.mycbr.core.casebase.Range
de.dfki.mycbr.core.casebase.StringRange
- All Implemented Interfaces:
- java.util.Observer
public final class StringRange
- extends Range
Maintains string attributes for a fixed string description. Unlike other
ranges (classes which implements Range) does not have a list of
the current string values, since StringAttribute objects will not be
referenced.
- Author:
- myCBR Team
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringRange
public StringRange(Project prj,
StringDesc d)
- Parameters:
prj - the project this range belongs tod - the symbol description for this attribute
getStringValue
public StringAttribute getStringValue(java.lang.String s)
- Creates a new StringAttribute associated with the given String.
- Parameters:
s - the value for which the corresponding StringAttribute should
be returned
- Returns:
- the StringAttribute specified by string
getAttribute
public Attribute getAttribute(java.lang.Object obj)
- Gets the attribute associated with the specified
Object obj.
obj is expected to be of type String. Returns result of
getStringValue(String) if obj is of type String,
result of Project.getSpecialAttribute(String) if obj is of type
SpecialAttribute, else returns null. Is needed for
MultipleRange.
- Specified by:
getAttribute in class Range
- Parameters:
obj - representing String or SpecialAttribute
- Returns:
- SimpleAttribute that corresponds to obj, null if there is no such
SimpleAttribute
update
public void update(java.util.Observable arg0,
java.lang.Object arg1)
parseValue
public Attribute parseValue(java.lang.String string)
- Parameters:
string - the string which should be used for parsing
- Returns:
- the attribute which corresponds to the given string