mirror of https://github.com/apache/activemq.git
Adding a handy getList() method to the LinkedNode impl
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@738946 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f6ebeecc2a
commit
42824ffc55
|
@ -212,11 +212,11 @@ public class LinkedNode<T extends LinkedNode<T>> {
|
|||
/**
|
||||
* Removes this node out of the linked list it is chained in.
|
||||
*/
|
||||
public void unlink() {
|
||||
public boolean unlink() {
|
||||
|
||||
// If we are allready unlinked...
|
||||
if (list == null) {
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (getThis() == prev) {
|
||||
|
@ -233,6 +233,7 @@ public class LinkedNode<T extends LinkedNode<T>> {
|
|||
}
|
||||
list.size--;
|
||||
list = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -316,4 +317,8 @@ public class LinkedNode<T extends LinkedNode<T>> {
|
|||
return list != null;
|
||||
}
|
||||
|
||||
public LinkedNodeList<T> getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue