Add accessor methods for value field in Node of AbstractLinkedList

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/collections/trunk@131672 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stephen Colebourne 2004-04-20 23:47:53 +00:00
parent a99be038ce
commit cf68324e1b
2 changed files with 4 additions and 3 deletions

View File

@ -44,6 +44,7 @@ No interface changes, or deprecations have occurred.
<li>CollectionUtils - get(Object,int) method now supports primitive arrays</li>
<li>CollectionUtils - Add size(Object) method to find the size of various collection-like objects [27909]</li>
<li>SingletonIterator - make remove() functionality optional</li>
<li>AbstractLinkedList/NodeCachingLinkedList - added getValue() and setValue() to Node, and made everything use them</li>
</ul>
<h4>Made Serializable</h4>

View File

@ -36,7 +36,7 @@ import java.util.Collection;
* <b>Note that this implementation is not synchronized.</b>
*
* @since Commons Collections 3.0
* @version $Revision: 1.6 $ $Date: 2004/02/18 01:12:26 $
* @version $Revision: 1.7 $ $Date: 2004/04/20 23:46:50 $
*
* @author Jeff Varszegi
* @author Rich Dougherty
@ -172,7 +172,7 @@ public class NodeCachingLinkedList extends AbstractLinkedList implements Seriali
Node nextCachedNode = firstCachedNode;
node.previous = null;
node.next = nextCachedNode;
node.value = null;
node.setValue(null);
firstCachedNode = node;
cacheSize++;
}
@ -190,7 +190,7 @@ public class NodeCachingLinkedList extends AbstractLinkedList implements Seriali
if (cachedNode == null) {
return super.createNode(value);
} else {
cachedNode.value = value;
cachedNode.setValue(value);
return cachedNode;
}
}