edu.stanford.nlp.dbm
Class AbstractDataCollection

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--edu.stanford.nlp.dbm.AbstractDataCollection
All Implemented Interfaces:
Collection, DataCollection, List
Direct Known Subclasses:
Corpus, FileDataCollection

public abstract class AbstractDataCollection
extends AbstractList
implements DataCollection

Abstract Data Collection. Subclasses need only implement add(Datum d).


Field Summary
protected  List data
           
protected  Matrix datamatrix
           
protected  List features
           
protected  String name
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
AbstractDataCollection()
           
 
Method Summary
 Matrix dataMatrix()
          returns the data matrix
 List features()
          returns a List of Features and their corresponding indices.
 Object get(int index)
           
 String name()
          Returns the name of this DataCollection
 int size()
           
 String toString()
          returns a String representation of DBM
 String toXMLString()
          returns an XML String representation of DataCollection
 
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.stanford.nlp.dbm.DataCollection
add
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, subList, toArray, toArray
 

Field Detail

datamatrix

protected Matrix datamatrix

features

protected List features

data

protected List data

name

protected String name
Constructor Detail

AbstractDataCollection

public AbstractDataCollection()
Method Detail

dataMatrix

public Matrix dataMatrix()
returns the data matrix

Specified by:
dataMatrix in interface DataCollection

features

public List features()
returns a List of Features and their corresponding indices.

Specified by:
features in interface DataCollection

name

public String name()
Returns the name of this DataCollection

Specified by:
name in interface DataCollection

toString

public String toString()
Description copied from interface: DataCollection
returns a String representation of DBM

Specified by:
toString in interface DataCollection
Overrides:
toString in class AbstractCollection

toXMLString

public String toXMLString()
returns an XML String representation of DataCollection


get

public Object get(int index)
Specified by:
get in interface List
Specified by:
get in class AbstractList

size

public int size()
Specified by:
size in interface List
Specified by:
size in class AbstractCollection


Stanford NLP Group