edu.cmu.minorthird.classify
Class AbstractInstance

java.lang.Object
  extended by edu.cmu.minorthird.classify.AbstractInstance
All Implemented Interfaces:
HasSubpopulationId, Instance, Visible
Direct Known Subclasses:
FeatureFactory.CompactInstance, MaskedInstance, MutableInstance

public abstract class AbstractInstance
extends java.lang.Object
implements Instance, Visible

Common code for all instance implementations

Author:
ksteppe

Field Summary
protected  java.lang.Object source
           
protected  java.lang.String subpopulationId
           
 
Constructor Summary
AbstractInstance()
           
 
Method Summary
 java.lang.Object getSource()
          Return the underlying object being represented.
 java.lang.String getSubpopulationId()
          Return the subpopulation from which the source was drawn.
 Viewer toGUI()
          Retrieve Viewer for the instance
 java.lang.String toString()
          Debugging view of an instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.cmu.minorthird.classify.Instance
binaryFeatureIterator, featureIterator, getWeight, numericFeatureIterator, numFeatures
 

Field Detail

source

protected java.lang.Object source

subpopulationId

protected java.lang.String subpopulationId
Constructor Detail

AbstractInstance

public AbstractInstance()
Method Detail

getSource

public java.lang.Object getSource()
Return the underlying object being represented.

Specified by:
getSource in interface Instance

getSubpopulationId

public java.lang.String getSubpopulationId()
Return the subpopulation from which the source was drawn.

Specified by:
getSubpopulationId in interface HasSubpopulationId
Specified by:
getSubpopulationId in interface Instance

toString

public java.lang.String toString()
Debugging view of an instance.

Overrides:
toString in class java.lang.Object

toGUI

public Viewer toGUI()
Retrieve Viewer for the instance

Specified by:
toGUI in interface Visible