More information: http://www.cs.berkeley.edu/~mdw/proj/seda/

seda.sandStorm.core
Class ssLinkedList

java.lang.Object
  |
  +--seda.sandStorm.core.ssLinkedList

public class ssLinkedList
extends java.lang.Object

The ssLinkedList class is just that - a linked list abstraction that supports very efficient insertion and deletion, as well as an Enumeration interface. None of the methods in this linked list are synchronized. If you want synchronization, do it yourself.

Author:
Steve Gribble

Inner Class Summary
 class ssLinkedList.ssLinkedListEnumeration
          A ssLinkedListEnumeration is a java.util.Enumeration over the ssLinkedList elements.
 
Constructor Summary
ssLinkedList()
          Allocates a brand new ssLinkedList
 
Method Summary
 void add_to_head(java.lang.Object o)
          Adds an object to the head (start) of the linked list.
 void add_to_tail(java.lang.Object o)
          Adds an object to the tail (end) of the linked list.
 java.util.Enumeration elements()
          Returns a java.util.Enumeration enumeration over the elements of the linked list.
 java.lang.Object get_comparator(java.lang.Object known, ssLinkedListComparator llc)
          Gets the first object to match according to the comparator function.
 java.lang.Object get_head()
          Gets the head object from the linked list.
 java.lang.Object get_item(java.lang.Object known)
          Returns the first object that is "equal" to the given object, based on the response of the Object.equals() method.
 java.lang.Object get_tail()
          Gets the tail object from the linked list.
static void main(java.lang.String[] args)
           
 void remove_all()
           
 java.lang.Object remove_comparator(java.lang.Object known, ssLinkedListComparator llc)
          Removes the first object to match according to the comparator function, and returns it.
 java.lang.Object remove_head()
          Removes the head object from the linked list, and returns it.
 java.lang.Object remove_item(java.lang.Object known)
          Removes the first object that is "equal" to the given object, based on the response of the Object.equals() method.
 java.lang.Object remove_tail()
          Removes the tail object from the linked list, and returns it.
 int size()
          Returns the number of elements in the list
 java.lang.String toString()
          Return a string representation, for debugging purposes
 java.lang.String toString(java.lang.String prefix)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ssLinkedList

public ssLinkedList()
Allocates a brand new ssLinkedList
Method Detail

size

public int size()
Returns the number of elements in the list
Returns:
number of elements in the list

add_to_tail

public void add_to_tail(java.lang.Object o)
Adds an object to the tail (end) of the linked list.
Parameters:
o - the object to add

get_tail

public java.lang.Object get_tail()
Gets the tail object from the linked list.
Returns:
the tail, or null if there is nothing in the list.

remove_tail

public java.lang.Object remove_tail()
Removes the tail object from the linked list, and returns it.
Returns:
the tail, or null if there is nothing in the list.

add_to_head

public void add_to_head(java.lang.Object o)
Adds an object to the head (start) of the linked list.
Parameters:
o - the object to add

get_head

public java.lang.Object get_head()
Gets the head object from the linked list.
Returns:
the head, or null if there is nothing in the list.

remove_head

public java.lang.Object remove_head()
Removes the head object from the linked list, and returns it.
Returns:
the head, or null if there is nothing in the list.

remove_all

public void remove_all()

get_comparator

public java.lang.Object get_comparator(java.lang.Object known,
                                       ssLinkedListComparator llc)
Gets the first object to match according to the comparator function.
Returns:
the matching object, or null if there is nothing that matches.

remove_comparator

public java.lang.Object remove_comparator(java.lang.Object known,
                                          ssLinkedListComparator llc)
Removes the first object to match according to the comparator function, and returns it.
Returns:
the match, or null if there is nothing that matches.

get_item

public java.lang.Object get_item(java.lang.Object known)
Returns the first object that is "equal" to the given object, based on the response of the Object.equals() method.

remove_item

public java.lang.Object remove_item(java.lang.Object known)
Removes the first object that is "equal" to the given object, based on the response of the Object.equals() method.

elements

public java.util.Enumeration elements()
Returns a java.util.Enumeration enumeration over the elements of the linked list. If you modify the list while enumerating over it, you get what you deserve (i.e. undefined behaviour).
Returns:
the enumeration over the elements
See Also:
Enumeration

toString

public java.lang.String toString()
Return a string representation, for debugging purposes
Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(java.lang.String prefix)

main

public static void main(java.lang.String[] args)

More information: http://www.cs.berkeley.edu/~mdw/proj/seda/