Class FastLinkedList.Entry

  • Enclosing class:
    FastLinkedList<E>

    public class FastLinkedList.Entry
    extends java.lang.Object
    An entry in this linked list that contains an element.
    Since:
    Ptolemy II 8.0
    Version:
    $Id$
    Author:
    Thomas Huining Feng
    Pt.AcceptedRating:
    Red (tfeng)
    Pt.ProposedRating:
    Yellow (tfeng)
    • Method Detail

      • getElement

        public E getElement()
        Get the element in this entry.
        Returns:
        The element.
      • getList

        public FastLinkedList<E> getList()
        Get the linked list that contains this entry.
        Returns:
        The linked list.
      • getNext

        public FastLinkedList.Entry getNext()
        Get the next entry.
        Returns:
        The next entry, or null if this entry is at the tail.
      • getPrevious

        public FastLinkedList.Entry getPrevious()
        Get the previous entry.
        Returns:
        The next entry, or null if this entry is at the head.
      • hasNext

        public boolean hasNext()
        Test whether there is a next entry.
        Returns:
        true if there is a next entry.
      • hasPrevious

        public boolean hasPrevious()
        Test whether there is a previous entry.
        Returns:
        true if there is a previous entry.
      • remove

        public void remove()
        Remove this entry from the linked list that contains it.