edu.indiana.iucbrf.feature
Class CharacterFeature
java.lang.Object
edu.indiana.iucbrf.feature.AbstractFeature
edu.indiana.iucbrf.feature.CharacterFeature
- All Implemented Interfaces:
- DoubleRepresentable, Feature, SwingRepresentable, java.io.Serializable, java.lang.Comparable
public class CharacterFeature
- extends AbstractFeature
- implements DoubleRepresentable
A Feature with a value that is a Character.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DEFAULT_FEATURE_DIFFERENTIATOR
public static final FeatureDifferentiator DEFAULT_FEATURE_DIFFERENTIATOR
DEFAULT_VARIABLE_TYPE
public static final int DEFAULT_VARIABLE_TYPE
- See Also:
- Constant Field Values
STANDARD_CONSTRUCTOR
public static final transient java.lang.reflect.Constructor STANDARD_CONSTRUCTOR
CharacterFeature
public CharacterFeature()
CharacterFeature
public CharacterFeature(Distribution distribution)
CharacterFeature
public CharacterFeature(java.lang.Object new_value)
CharacterFeature
public CharacterFeature(Feature other_feature)
getDefaultVariableType
public int getDefaultVariableType()
- Description copied from interface:
Feature
- Get the variable type (for example, Feature.NOMINAL_VARIABLE, Feature.ORDINAL_VARIABLE,
Feature.INTERVAL_VARIABLE, or Feature.OTHER_VARIABLE).
- Specified by:
getDefaultVariableType
in interface Feature
getFeatureInputPanel
public static FeatureInputPanel getFeatureInputPanel(int collectionType,
Domain domain,
FeatureKey featureKey,
boolean allowUnknowns)
clone
public java.lang.Object clone()
- forces desendants to re-implement clone!! interesting left this in
makes you think about clone(). usually use a copy constructor if
anything
- Specified by:
clone
in interface Feature
- Specified by:
clone
in class AbstractFeature
setValue
public void setValue(java.lang.Object new_value)
- Specified by:
setValue
in interface Feature
midpoint
public Feature midpoint(Feature other_feature)
- Specified by:
midpoint
in interface Feature
- Specified by:
midpoint
in class AbstractFeature
compareTo
public int compareTo(java.lang.Object otherFeature)
- Compare this feature with another. It is assumed that otherFeature is a CharacterFeature.
Return value is < 0 (here, -1) if "this" is less than otherFeature.
Return value is > 0 (here, 1) if "this" is greater than otherFeature.
Return value is = 0 (here, 0) if "this" equals otherFeature.
- Specified by:
compareTo
in interface java.lang.Comparable
- Overrides:
compareTo
in class AbstractFeature
getTypeDescription
public static java.lang.String getTypeDescription()
getValueAsDouble
public double getValueAsDouble()
- Description copied from interface:
DoubleRepresentable
- Get a representation of this feature as a double.
- Specified by:
getValueAsDouble
in interface DoubleRepresentable
setValueWithDouble
public void setValueWithDouble(double newValue)
- Description copied from interface:
DoubleRepresentable
- Set the value of this feature according to a double.
- Specified by:
setValueWithDouble
in interface DoubleRepresentable