|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.columbia.cs.ref.model.Dataset<E>
E
- the atomic element of the datasetpublic class Dataset<E>
The Class Dataset represents a dataset of a given type of atomic elements (e.g., Documents, Candidate Setencens).
This class implements all the methods that allow to iterate over the dataset
as well as load it.
Constructor Summary | |
---|---|
Dataset()
Instantiates an empty dataset. |
|
Dataset(java.util.Collection<E> list)
Instantiates a new dataset from a given collection of atomic elements. |
|
Dataset(Loader<E> l,
java.io.File f,
boolean isListOfFiles)
Instantiates a new dataset by using a specific loader and a file. |
Method Summary | |
---|---|
void |
add(E input)
Adds the input object to the dataset |
void |
addAll(java.util.Collection<E> inputs)
Adds all the objects in the in the input collection to the dataset |
void |
addAll(Dataset<E> inputs)
Adds the all the elements that are in the input dataset to the current dataset |
java.util.Iterator<E> |
iterator()
|
int |
size()
The number of objects in the dataset |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Dataset()
public Dataset(java.util.Collection<E> list)
list
- the collection of atomic elementspublic Dataset(Loader<E> l, java.io.File f, boolean isListOfFiles)
l
- the loader that will be used to load the datasetf
- the file to be loadedisListOfFiles
- true if f is a text document containing the paths for the elements of the datasetMethod Detail |
---|
public void add(E input)
input
- the new element of the datasetpublic void addAll(java.util.Collection<E> inputs)
inputs
- the new elements of the datasetpublic void addAll(Dataset<E> inputs)
inputs
- the dataset to be addedpublic java.util.Iterator<E> iterator()
iterator
in interface java.lang.Iterable<E>
public int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |