edu.indiana.iucbrf.feature
Class StringFeature

java.lang.Object
  extended by edu.indiana.iucbrf.feature.AbstractFeature
      extended by edu.indiana.iucbrf.feature.StringFeature
All Implemented Interfaces:
Feature, SwingRepresentable, java.io.Serializable, java.lang.Comparable
Direct Known Subclasses:
LongStringFeature

public class StringFeature
extends AbstractFeature

A Feature with a value that is a TextTermVector pair. If no term vector (keywords) is available, a simple String is sufficient.

See Also:
Serialized Form

Field Summary
static FeatureDifferentiator DEFAULT_FEATURE_DIFFERENTIATOR
           
static int DEFAULT_VARIABLE_TYPE
           
static java.lang.reflect.Constructor STANDARD_CONSTRUCTOR
           
 
Fields inherited from class edu.indiana.iucbrf.feature.AbstractFeature
DEFAULT_CONSTRUCTED, NO_STANDARD_CONSTRUCTOR, value
 
Fields inherited from interface edu.indiana.iucbrf.feature.Feature
DEFAULT_FEATURE_DIFFERENTIATORS_BY_VARTYPE, FEATURE_VALUE_FONT, INTERVAL_VARIABLE, LABEL_WIDTH, NOMINAL_VARIABLE, ORDINAL_VARIABLE, OTHER_VARIABLE
 
Fields inherited from interface edu.indiana.util.swing.SwingRepresentable
TITLE_FONT
 
Constructor Summary
StringFeature()
           
StringFeature(Distribution distribution)
           
StringFeature(Feature other_feature)
           
StringFeature(java.lang.Object new_value)
           
StringFeature(java.lang.String new_value)
           
 
Method Summary
 java.lang.Object clone()
          forces desendants to re-implement clone!! interesting left this in makes you think about clone().
 int compareTo(java.lang.Object otherFeature)
          Compare this feature with another.
 int getDefaultVariableType()
          Get the variable type (for example, Feature.NOMINAL_VARIABLE, Feature.ORDINAL_VARIABLE, Feature.INTERVAL_VARIABLE, or Feature.OTHER_VARIABLE).
static FeatureInputPanel getFeatureInputPanel(int collectionType, Domain domain, FeatureKey featureKey, boolean allowUnknowns)
           
static java.lang.String getTypeDescription()
           
 Feature midpoint(Feature other_feature)
           
 void setValue(java.lang.Object new_value)
           
 
Methods inherited from class edu.indiana.iucbrf.feature.AbstractFeature
adjust, checkAndGetDoubleValue, equals, getValue, toString, toString, toSwing, toSwing, toSwing
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

StringFeature

public StringFeature()

StringFeature

public StringFeature(Distribution distribution)

StringFeature

public StringFeature(java.lang.Object new_value)

StringFeature

public StringFeature(java.lang.String new_value)

StringFeature

public StringFeature(Feature other_feature)
Method Detail

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).


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)

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 StringFeature. This comparison simply compares the text - it does not examine the term vector.
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()