mark.nlp.data
Class Instance

java.lang.Object
  |
  +--mark.nlp.data.Instance
Direct Known Subclasses:
SparseBagInstance, TextInstance, TokenInstance

public abstract class Instance
extends java.lang.Object

A base class for representations of an instance. Every instance has a category. The class follows the Immutable design pattern.


Constructor Summary
Instance(int category)
          Initializes the instance.
 
Method Summary
 int category()
          Returns the instance's category.
 void setCategory(int category)
          Sets the instance's category.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Instance

public Instance(int category)
Initializes the instance.

Parameters:
category - the instance's category.
Method Detail

category

public int category()
Returns the instance's category.

Returns:
the instance's category.

setCategory

public void setCategory(int category)
Sets the instance's category.

Parameters:
category - the new category.