Package org.apache.activemq.util
Class LinkedNode
- java.lang.Object
-
- org.apache.activemq.util.LinkedNode
-
- Direct Known Subclasses:
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
Fields Modifier and Type Field Description protected LinkedNode
next
protected LinkedNode
prev
protected boolean
tail
-
Constructor Summary
Constructors Constructor Description LinkedNode()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Field Detail
-
next
protected LinkedNode next
-
prev
protected LinkedNode prev
-
tail
protected boolean tail
-
-
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:
- this
-
unlink
public void unlink()
Removes this node out of the linked list it is chained in.
-
reset
public void reset()
-
-