1 16 package org.apache.commons.collections.buffer; 17 18 import org.apache.commons.collections.Buffer; 19 import org.apache.commons.collections.Predicate; 20 import org.apache.commons.collections.collection.PredicatedCollection; 21 22 41 public class PredicatedBuffer extends PredicatedCollection implements Buffer { 42 43 44 private static final long serialVersionUID = 2307609000539943581L; 45 46 58 public static Buffer decorate(Buffer buffer, Predicate predicate) { 59 return new PredicatedBuffer(buffer, predicate); 60 } 61 62 74 protected PredicatedBuffer(Buffer buffer, Predicate predicate) { 75 super(buffer, predicate); 76 } 77 78 83 protected Buffer getBuffer() { 84 return (Buffer) getCollection(); 85 } 86 87 public Object get() { 89 return getBuffer().get(); 90 } 91 92 public Object remove() { 93 return getBuffer().remove(); 94 } 95 96 } 97 | Popular Tags |