org.debellor.core
Class Sample.SampleType

java.lang.Object
  extended by org.debellor.core.DataType
      extended by org.debellor.core.Sample.SampleType
Enclosing class:
Sample

public static final class Sample.SampleType
extends DataType

Describes common properties of all Sample objects in a given data Cell.Stream. SampleType objects are immutable.

See Also:
Cell.open(), Cell.onOpen()

Field Summary
 DataType data
          Type of Sample.data field.
 DataType decision
          Type of Sample.decision field.
 
Fields inherited from class org.debellor.core.DataType
dataClass, NOT_PRESENT, UNKNOWN
 
Constructor Summary
Sample.SampleType(DataType data, DataType decision)
           
 
Method Summary
 boolean hasDecision()
          Returns true if samples of the data set contain decisions and their type is known (defined).
 Sample.SampleType setData(DataType data)
           
 Sample.SampleType setDecision(DataType decision)
           
 java.lang.String toString()
           
 
Methods inherited from class org.debellor.core.DataType
asDataVectorType, asSymbolicFeatureType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

data

public final DataType data
Type of Sample.data field. Can take on special values defined in DataType, like DataType.UNKNOWN or DataType.NOT_PRESENT.


decision

public final DataType decision
Type of Sample.decision field. Can take on special values defined in DataType, like DataType.UNKNOWN or DataType.NOT_PRESENT. NOT_PRESENT means that samples do not have decisions, they are composed of 'data' part alone.

Constructor Detail

Sample.SampleType

public Sample.SampleType(DataType data,
                         DataType decision)
Method Detail

setData

public Sample.SampleType setData(DataType data)

setDecision

public Sample.SampleType setDecision(DataType decision)

hasDecision

public boolean hasDecision()
Returns true if samples of the data set contain decisions and their type is known (defined). Note that still some decisions (even all of them) may have null values.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object