From 18b81f0c317de53a0539ad1dbd191f36b64f6cc7 Mon Sep 17 00:00:00 2001 From: Henri Yandell Date: Tue, 15 Sep 2009 05:54:31 +0000 Subject: [PATCH] Merging from -r468106:814127 of collections_jdk5_branch - namely where this code was generified; mostly in r738956. Also see the following revisions: ------------------------------------------------------------------------ r555925 | skestle | 2007-07-13 03:39:24 -0700 (Fri, 13 Jul 2007) | 2 lines Added Edwin Tellman's patch for COLLECTIONS-243. It all seems pretty reasonable, and it should all be checked again as the project is worked through ------------------------------------------------------------------------ r471202 | scolebourne | 2006-11-04 06:21:44 -0800 (Sat, 04 Nov 2006) | 1 line Remove getCollection() - use covariant decorated() ------------------------------------------------------------------------ git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@815030 13f79535-47bb-0310-9956-ffa450edef68 --- .../collections/buffer/PredicatedBuffer.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/java/org/apache/commons/collections/buffer/PredicatedBuffer.java b/src/java/org/apache/commons/collections/buffer/PredicatedBuffer.java index c7944a4db..566283f11 100644 --- a/src/java/org/apache/commons/collections/buffer/PredicatedBuffer.java +++ b/src/java/org/apache/commons/collections/buffer/PredicatedBuffer.java @@ -39,7 +39,7 @@ import org.apache.commons.collections.collection.PredicatedCollection; * @author Stephen Colebourne * @author Paul Jack */ -public class PredicatedBuffer extends PredicatedCollection implements Buffer { +public class PredicatedBuffer extends PredicatedCollection implements Buffer { /** Serialization version */ private static final long serialVersionUID = 2307609000539943581L; @@ -56,8 +56,8 @@ public class PredicatedBuffer extends PredicatedCollection implements Buffer { * @throws IllegalArgumentException if buffer or predicate is null * @throws IllegalArgumentException if the buffer contains invalid elements */ - public static Buffer decorate(Buffer buffer, Predicate predicate) { - return new PredicatedBuffer(buffer, predicate); + public static Buffer decorate(Buffer buffer, Predicate predicate) { + return new PredicatedBuffer(buffer, predicate); } //----------------------------------------------------------------------- @@ -72,7 +72,7 @@ public class PredicatedBuffer extends PredicatedCollection implements Buffer { * @throws IllegalArgumentException if buffer or predicate is null * @throws IllegalArgumentException if the buffer contains invalid elements */ - protected PredicatedBuffer(Buffer buffer, Predicate predicate) { + protected PredicatedBuffer(Buffer buffer, Predicate predicate) { super(buffer, predicate); } @@ -81,17 +81,17 @@ public class PredicatedBuffer extends PredicatedCollection implements Buffer { * * @return the decorated buffer */ - protected Buffer getBuffer() { - return (Buffer) getCollection(); + protected Buffer decorated() { + return (Buffer) super.decorated(); } //----------------------------------------------------------------------- - public Object get() { - return getBuffer().get(); + public E get() { + return decorated().get(); } - public Object remove() { - return getBuffer().remove(); + public E remove() { + return decorated().remove(); } }