javolution.util
Class FastList.Node<E>

Object
  extended by FastList.Node<E>
All Implemented Interfaces:
Serializable, FastCollection.Record
Enclosing class:
FastList<E>

public static class FastList.Node<E>
extends Object
implements FastCollection.Record, Serializable

This class represents a FastList node; it allows for direct iteration over the list values. Custom FastList may use a derived implementation. For example:

    static class MyList<E,X> extends FastList<E> {
        protected MyNode newNode() {
            return new MyNode();
        }
        class MyNode extends Node<E> {
            X xxx; // Additional node field (e.g. cross references).
        }        
    }

See Also:
Serialized Form

Constructor Summary
protected FastList.Node()
          Default constructor.
 
Method Summary
 FastList.Node<E> getNext()
          Returns the record after this one.
 FastList.Node<E> getPrevious()
          Returns the record before this one.
 E getValue()
          Returns the value for this node.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FastList.Node

protected FastList.Node()
Default constructor.

Method Detail

getValue

public final E getValue()
Returns the value for this node.

Returns:
the node value.

getNext

public final FastList.Node<E> getNext()
Description copied from interface: FastCollection.Record
Returns the record after this one.

Specified by:
getNext in interface FastCollection.Record
Returns:
the next record.

getPrevious

public final FastList.Node<E> getPrevious()
Description copied from interface: FastCollection.Record
Returns the record before this one.

Specified by:
getPrevious in interface FastCollection.Record
Returns:
the previous record.


Copyright © 2005-2012 Javolution. All Rights Reserved.