edu.indiana.iucbrf.feature.finiteset
Class AbstractFSMFeature
java.lang.Object
edu.indiana.iucbrf.feature.AbstractFeature
edu.indiana.iucbrf.feature.finiteset.AbstractFSMFeature
- All Implemented Interfaces:
- DoubleRepresentable, Feature, FSMFeature, SwingRepresentable, java.io.Serializable, java.lang.Comparable
- Direct Known Subclasses:
- BooleanFeature, DisplayMessageFeature, FiveSeverityFeature, PrintQualityFeature, YesNoFeature
public abstract class AbstractFSMFeature
- extends AbstractFeature
- implements FSMFeature
This class makes general assumptions that should be applicable for most
FSMFeature implementations.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.lang.Comparable |
compareTo |
ONE_ANSWER_SET
public static final java.util.LinkedHashSet ONE_ANSWER_SET
FSM_FEATURE_CLASS
protected static final java.lang.Class FSM_FEATURE_CLASS
AbstractFSMFeature
protected AbstractFSMFeature()
AbstractFSMFeature
public AbstractFSMFeature(java.lang.Object value)
- Creates a new instance of AbstractFSMFeature
AbstractFSMFeature
public AbstractFSMFeature(Distribution distribution)
midpoint
public Feature midpoint(Feature other_feature)
- Specified by:
midpoint
in interface Feature
- Specified by:
midpoint
in class AbstractFeature
setValue
public void setValue(java.lang.Object new_value)
- Specified by:
setValue
in interface Feature
convertString
public java.lang.Object convertString(java.lang.String value)
clone
public java.lang.Object clone()
- Specified by:
clone
in interface Feature
- Specified by:
clone
in class AbstractFeature
isValidMember
public boolean isValidMember(java.lang.Object value)
- Specified by:
isValidMember
in interface FSMFeature
getValueAsDouble
public double getValueAsDouble()
- Get a representation of this feature as a double.
- Specified by:
getValueAsDouble
in interface DoubleRepresentable
setValueWithDouble
public void setValueWithDouble(double newValue)
- Set the value of this feature according to a double.
This method is linear in set size.
- Specified by:
setValueWithDouble
in interface DoubleRepresentable
setValueWithIndex
public void setValueWithIndex(int index)
- This method is linear in set size.
- Specified by:
setValueWithIndex
in interface FSMFeature
getValueAsIndex
public int getValueAsIndex()
- This method is linear in set size.
- Specified by:
getValueAsIndex
in interface FSMFeature
sizeOfSet
public int sizeOfSet()
- Specified by:
sizeOfSet
in interface FSMFeature
getValueCorrespondingToIndex
public java.lang.Object getValueCorrespondingToIndex(int index)
- This method is linear in set size.
- Specified by:
getValueCorrespondingToIndex
in interface FSMFeature
getValueCorrespondingToIndex
public java.lang.Object getValueCorrespondingToIndex(java.lang.Integer index)
buildSetDescription
protected static java.lang.String buildSetDescription(java.util.LinkedHashSet set)
isFSMFeature
public static boolean isFSMFeature(java.lang.Class aClass)
getCompleteSet
public static java.util.LinkedHashSet getCompleteSet(java.lang.Class featureType)