public class SimpleSet extends Object
Constructor and Description |
---|
SimpleSet(int documentLength)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(gate.Annotation annot)
Adds annotation.
|
void |
finish()
Precomputes the index to be used by the firstStartAfter method.
|
int |
firstStartOffsetAfter(int offset)
If endOffset is the offset of the end node of some annotation, for worst
case constant time returns the smallest i >= endOffset such that there is
an annotation with start node having offset i.
|
ArrayList<gate.Annotation> |
get(int startOffset)
the get method retrieves a list of all annotations with start node having
offset startOffset
|
boolean |
isEmpty() |
int |
size() |
public SimpleSet(int documentLength)
public ArrayList<gate.Annotation> get(int startOffset)
startOffset
- the offset to which the list should be retrieved.public void add(gate.Annotation annot)
annot
- the annotation to be addedpublic void finish()
public int firstStartOffsetAfter(int offset)
public boolean isEmpty()
public int size()