org.geotools.util
Class KeySortedLinkedList

java.lang.Object
  extended byorg.geotools.util.KeySortedLinkedList

Deprecated. Replaced by KeySortedList. The new implementation fits better in the Java Collection framework, and is also built on top of TreeMap, which should provides O(log(n)) performance instead of O(n) for most operations.

public class KeySortedLinkedList
extends java.lang.Object

List of elements sorted by a key which is not the element itself.

Version:
$Id: KeySortedLinkedList.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
Simone Giannecchini

Constructor Summary
KeySortedLinkedList()
          Deprecated. Replaced by KeySortedList.
 
Method Summary
 boolean contains(java.lang.Comparable x)
          Deprecated. Replaced by KeySortedList.containsKey(java.lang.Comparable).
 KeySortedLinkedListIterator find(java.lang.Comparable x)
          Deprecated. Replaced by KeySortedList.listIterator(Comparable), or KeySortedList.first(java.lang.Comparable) if only a single value is wanted.
 KeySortedLinkedListIterator findPrevious(java.lang.Comparable x)
          Deprecated. Replaced by KeySortedList.listIterator(Comparable) folllowed by calls to ListIterator.previous().
 KeySortedLinkedListIterator first()
          Deprecated. Replaced by AbstractSequentialList.iterator().
 KeySortedLinkedListIterator getAt(int index)
          Deprecated. Replaced by AbstractSequentialList.get(int).
 void insert(java.lang.Comparable x, java.lang.Object o)
          Deprecated. Replaced by KeySortedList.add(java.lang.Comparable, java.lang.Object). The new method name is instead of for consistency with other methods in the List interface.
 boolean isEmpty()
          Deprecated. Replaced by AbstractCollection.isEmpty().
 void remove(java.lang.Comparable x)
          Deprecated. Replaced by KeySortedList.removeAll(java.lang.Comparable).
 java.lang.String toString()
          Deprecated. Replaced by AbstractCollection.toString().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeySortedLinkedList

public KeySortedLinkedList()
Deprecated. Replaced by KeySortedList.

Method Detail

isEmpty

public boolean isEmpty()
Deprecated. Replaced by AbstractCollection.isEmpty().

Is the list empty?

Returns:
true if the list is empty flase otherwise.

first

public KeySortedLinkedListIterator first()
Deprecated. Replaced by AbstractSequentialList.iterator().

Retrieves an iterator that points to the first element or to null for an empty list.


insert

public void insert(java.lang.Comparable x,
                   java.lang.Object o)
Deprecated. Replaced by KeySortedList.add(java.lang.Comparable, java.lang.Object). The new method name is instead of for consistency with other methods in the List interface.

Inserting an element in the list by using a key. In case we already have such a key WE DO NOT replace the old value but we add a new one with the same key!

Parameters:
x - Key to be used to find the right location.
o - Object to be inserted.

contains

public boolean contains(java.lang.Comparable x)
Deprecated. Replaced by KeySortedList.containsKey(java.lang.Comparable).

Checks if the list contains a certain element, or better its key.


toString

public java.lang.String toString()
Deprecated. Replaced by AbstractCollection.toString().


find

public KeySortedLinkedListIterator find(java.lang.Comparable x)
Deprecated. Replaced by KeySortedList.listIterator(Comparable), or KeySortedList.first(java.lang.Comparable) if only a single value is wanted.


findPrevious

public KeySortedLinkedListIterator findPrevious(java.lang.Comparable x)
Deprecated. Replaced by KeySortedList.listIterator(Comparable) folllowed by calls to ListIterator.previous().


remove

public void remove(java.lang.Comparable x)
Deprecated. Replaced by KeySortedList.removeAll(java.lang.Comparable).


getAt

public KeySortedLinkedListIterator getAt(int index)
Deprecated. Replaced by AbstractSequentialList.get(int).

Returns the object stored at a determined zero-based index in case it exists, null otherwise.



Copyright © GeoTools. All Rights Reserved.