org.apache.activemq.util
Class LinkedNode

java.lang.Object
  extended by org.apache.activemq.util.LinkedNode
Direct Known Subclasses:
DataFile, PendingNode

public class LinkedNode
extends Object

Provides a base class for you to extend when you want object to maintain a doubly linked list to other objects without using a collection class.

Author:
chirino

Field Summary
protected  LinkedNode next
           
protected  LinkedNode prev
           
protected  boolean tail
           
 
Constructor Summary
LinkedNode()
           
 
Method Summary
 LinkedNode getHeadNode()
           
 LinkedNode getNext()
           
 LinkedNode getPrevious()
           
 LinkedNode getTailNode()
           
 boolean isHeadNode()
           
 boolean isTailNode()
           
 LinkedNode linkAfter(LinkedNode rightHead)
           
 LinkedNode linkBefore(LinkedNode leftHead)
           
 void reset()
           
 void unlink()
          Removes this node out of the linked list it is chained in.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

next

protected LinkedNode next

prev

protected LinkedNode prev

tail

protected boolean tail
Constructor Detail

LinkedNode

public LinkedNode()
Method Detail

getHeadNode

public LinkedNode getHeadNode()

getTailNode

public LinkedNode getTailNode()

getNext

public LinkedNode getNext()

getPrevious

public LinkedNode getPrevious()

isHeadNode

public boolean isHeadNode()

isTailNode

public boolean isTailNode()

linkAfter

public LinkedNode linkAfter(LinkedNode rightHead)
Parameters:
rightHead - the node to link after this node.
Returns:
this

linkBefore

public LinkedNode linkBefore(LinkedNode leftHead)
Parameters:
leftHead - the node to link after this node.
Returns:

unlink

public void unlink()
Removes this node out of the linked list it is chained in.


reset

public void reset()


Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.