From 42824ffc55a87dc4b8b440c25ad02a816b042a95 Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Thu, 29 Jan 2009 18:10:03 +0000 Subject: [PATCH] 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 --- .../src/main/java/org/apache/kahadb/util/LinkedNode.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/kahadb/src/main/java/org/apache/kahadb/util/LinkedNode.java b/kahadb/src/main/java/org/apache/kahadb/util/LinkedNode.java index 0a2e02c15f..f0e23ddbee 100644 --- a/kahadb/src/main/java/org/apache/kahadb/util/LinkedNode.java +++ b/kahadb/src/main/java/org/apache/kahadb/util/LinkedNode.java @@ -212,11 +212,11 @@ public class LinkedNode> { /** * 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> { } list.size--; list = null; + return true; } /** @@ -316,4 +317,8 @@ public class LinkedNode> { return list != null; } + public LinkedNodeList getList() { + return list; + } + }