edu.indiana.iucbrf.feature
Class DoubleFeature

java.lang.Object
  extended by edu.indiana.iucbrf.feature.AbstractFeature
      extended by edu.indiana.iucbrf.feature.DoubleFeature
All Implemented Interfaces:
DoubleRepresentable, Feature, SwingRepresentable, java.io.Serializable, java.lang.Comparable

public class DoubleFeature
extends AbstractFeature
implements DoubleRepresentable

A Feature with a value that is a double.

See Also:
Serialized Form

Field Summary
static int DEFAULT_VARIABLE_TYPE
           
 
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
DoubleFeature()
           
DoubleFeature(Distribution distribution)
           
DoubleFeature(double newValue)
           
DoubleFeature(java.lang.Double value)
           
DoubleFeature(DoubleRepresentable otherFeature)
           
DoubleFeature(java.lang.Number newValue)
           
DoubleFeature(java.lang.String numericalString)
           
 
Method Summary
 void adjust(double adjustAmount)
           
 java.lang.Object clone()
           
 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()
           
 double getValueAsDouble()
          Get a representation of this feature as a double.
 Feature midpoint(Feature otherFeature)
           
 void setValue(java.lang.Object new_value)
           
 void setValueWithDouble(double newValue)
          Set the value of this feature according to a double.
 
Methods inherited from class edu.indiana.iucbrf.feature.AbstractFeature
checkAndGetDoubleValue, compareTo, 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_VARIABLE_TYPE

public static final int DEFAULT_VARIABLE_TYPE
See Also:
Constant Field Values
Constructor Detail

DoubleFeature

public DoubleFeature(double newValue)

DoubleFeature

public DoubleFeature(java.lang.Double value)

DoubleFeature

public DoubleFeature(java.lang.Number newValue)

DoubleFeature

public DoubleFeature(java.lang.String numericalString)

DoubleFeature

public DoubleFeature()

DoubleFeature

public DoubleFeature(DoubleRepresentable otherFeature)

DoubleFeature

public DoubleFeature(Distribution distribution)
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).

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()
Specified by:
clone in interface Feature
Specified by:
clone in class AbstractFeature

midpoint

public Feature midpoint(Feature otherFeature)
Specified by:
midpoint in interface Feature
Specified by:
midpoint in class AbstractFeature

adjust

public void adjust(double adjustAmount)
Specified by:
adjust in interface Feature
Overrides:
adjust in class AbstractFeature

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

setValue

public void setValue(java.lang.Object new_value)
Specified by:
setValue in interface Feature

getTypeDescription

public static java.lang.String getTypeDescription()