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:
Hiram R. Chirino 2009-01-29 18:10:03 +00:00
parent f6ebeecc2a
commit 42824ffc55
1 changed files with 7 additions and 2 deletions

View File

@ -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;
}
}