org.fusesource.hawtdb.util.list
Class SortedLinkedList<T extends SortedLinkedListNode<T>>

java.lang.Object
  extended by org.fusesource.hawtdb.util.list.SortedLinkedList<T>

public class SortedLinkedList<T extends SortedLinkedListNode<T>>
extends java.lang.Object


Field Summary
protected  TreeMap<java.lang.Long,T> index
           
 
Constructor Summary
SortedLinkedList()
           
 
Method Summary
 void add(T node)
           
 void clear()
           
 T get(long sequence)
           
 T getHead()
           
 T getTail()
           
 boolean isEmpty()
           
 T lower(long sequence, boolean inclusive)
           
 void remove(T node)
           
 int size()
           
 java.util.ArrayList<T> toArrayList()
          Copies the nodes of the LinkedNodeList to an ArrayList.
 java.lang.String toString()
           
 T upper(long sequence, boolean inclusive)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

index

protected final TreeMap<java.lang.Long,T extends SortedLinkedListNode<T>> index
Constructor Detail

SortedLinkedList

public SortedLinkedList()
Method Detail

isEmpty

public boolean isEmpty()

add

public void add(T node)

get

public T get(long sequence)
Parameters:
sequence - The sequence number of the element to get.

lower

public T lower(long sequence,
               boolean inclusive)

upper

public T upper(long sequence,
               boolean inclusive)

remove

public void remove(T node)

getHead

public T getHead()

getTail

public T getTail()

clear

public void clear()

size

public int size()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toArrayList

public java.util.ArrayList<T> toArrayList()
Copies the nodes of the LinkedNodeList to an ArrayList.

Returns:


Copyright © 2009-2011 FuseSource, Corp.. All Rights Reserved.