LimeWire Collection Component API

org.limewire.collection
Class DoublyLinkedList.ListElement<E>

java.lang.Object
  extended by org.limewire.collection.DoublyLinkedList.ListElement<E>
Enclosing class:
DoublyLinkedList<E>

public static class DoublyLinkedList.ListElement<E>
extends Object

Represents an immutable element of the linked list.

    DoublyLinkedList dll = new DoublyLinkedList();
    dll.addLast("Abby");
    dll.addLast("Bob");
    dll.addLast("Chris");
    ListElement<String> dan = dll.addLast("Dan");

    for(DoublyLinkedList.ListElement<String> e : dll)
        System.out.println(e.getKey());
    dll.remove(dan);
    System.out.println("");
    for(DoublyLinkedList.ListElement<String> e : dll)
        System.out.println(e.getKey());     

    Output:
        Abby
        Bob
        Chris
        Dan

        Abby
        Bob
        Chris


Method Summary
 E getKey()
          returns the key stored in this element
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getKey

public E getKey()
returns the key stored in this element

Returns:
the key stored in this element

LimeWire Collection Component API

Copyright © 2009 Lime Wire LLC. All Rights Reserved.