|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgate.util.SimpleSortedSet
public class SimpleSortedSet
The purpose of this Map is to combine the functionality found in TreeSet, especially first() and tailSet() with the hashcode driven map using native long as key to hold the annotations ordered by their offset. It is used in the SinglePhaseTransducer.transduce()
Constructor Summary | |
---|---|
SimpleSortedSet()
the Contructor. fills the allocated offset's array with the large possible valuse so any valis value will be placed on front of them. |
Method Summary | |
---|---|
boolean |
add(long elValue,
Object o)
add the new annotation to the annotation list for the given offset Note: if the offset is not in the map new empty list is created and the annotation is added to it |
long |
first()
retrive the smallest offset of the array. |
Object |
get(long elValue)
the get method retrive the List element by offset key given as argument |
boolean |
isEmpty()
is the map is empty |
int |
size()
|
void |
sort()
sort the offset's array in ascending way |
SimpleSortedSet |
tailSet(long elValue)
calculate the index of the first element in the offset's array that is equal or not greater then the given one |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleSortedSet()
Method Detail |
---|
public Object get(long elValue)
elValue
- the offset to which the list should be retrived.
public boolean add(long elValue, Object o)
elValue
- the offset of the annotationo
- the annotation instance to be placed in the list
public void sort()
public long first()
public SimpleSortedSet tailSet(long elValue)
elValue
- the value to search for
public boolean isEmpty()
public int size()
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |