|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection java.util.AbstractList java.util.AbstractSequentialList org.geotools.util.KeySortedList
List of elements sorted by a key which is not the element itself.
Field Summary |
Fields inherited from class java.util.AbstractList |
modCount |
Constructor Summary | |
KeySortedList()
Creates a new, initially empty list. |
Method Summary | |
void |
add(java.lang.Comparable key,
java.lang.Object element)
Inserts the specified element at a position determined by the specified key. |
void |
clear()
Removes all of the elements from this list. |
boolean |
containsKey(java.lang.Comparable key)
Returns if the list contains an element added with the specified key. |
int |
count(java.lang.Comparable key)
Returns the number of elements added with the specified key. |
java.lang.Object |
first(java.lang.Comparable key)
Returns the first element added with the specified key. |
KeySortedList |
headList(java.lang.Comparable toKey)
Returns a view of the portion of this list whose keys are strictly less than . |
java.lang.Object |
last(java.lang.Comparable key)
Returns the last element added with the specified key. |
java.util.ListIterator |
listIterator(java.lang.Comparable fromKey)
Returns a list iterator of the elements in this list (in proper sequence), starting at the elements added with the specified key. |
java.util.ListIterator |
listIterator(int index)
Returns a list iterator of the elements in this list (in proper sequence), starting at the specified position. |
int |
removeAll(java.lang.Comparable key)
Removes all values that were added with the specified key. |
int |
size()
Returns the number of elements in this list. |
KeySortedList |
tailList(java.lang.Comparable fromKey)
Returns a view of the portion of this list whose keys are greater than or equal to . |
Methods inherited from class java.util.AbstractSequentialList |
add, addAll, get, iterator, remove, set |
Methods inherited from class java.util.AbstractList |
add, equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList |
Methods inherited from class java.util.AbstractCollection |
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray |
Constructor Detail |
public KeySortedList()
Method Detail |
public void clear()
clear
in interface java.util.List
public int size()
size
in interface java.util.List
public void add(java.lang.Comparable key, java.lang.Object element)
Map
would do), but instead add the new element with
the same key.
key
- Key to be used to find the right location.element
- Object to be inserted.public int removeAll(java.lang.Comparable key)
public int count(java.lang.Comparable key)
public boolean containsKey(java.lang.Comparable key)
count(key) != 0
.
public java.lang.Object first(java.lang.Comparable key) throws java.util.NoSuchElementException
key
- The key for the element to search for.
java.util.NoSuchElementException
- if there is no element for the specified key.public java.lang.Object last(java.lang.Comparable key) throws java.util.NoSuchElementException
key
- The key for the element to search for.
java.util.NoSuchElementException
- if there is no element for the specified key.public java.util.ListIterator listIterator(java.lang.Comparable fromKey)
fromKey
- The key of the first element to returns.
java.lang.IndexOutOfBoundsException
- if the index is out of range.public java.util.ListIterator listIterator(int index)
next()
method.
listIterator
in interface java.util.List
index
- Index of first element to be returned from the list iterator.
java.lang.IndexOutOfBoundsException
- if the index is out of range.public KeySortedList headList(java.lang.Comparable toKey)
toKey
- high endpoint (exclusive) of the sub list.
public KeySortedList tailList(java.lang.Comparable fromKey)
fromKey
- low endpoint (inclusive) of the sub list.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |