1 16 package org.apache.commons.collections.buffer; 17 18 import org.apache.commons.collections.Buffer; 19 import org.apache.commons.collections.Transformer; 20 import org.apache.commons.collections.collection.TransformedCollection; 21 22 37 public class TransformedBuffer extends TransformedCollection implements Buffer { 38 39 40 private static final long serialVersionUID = -7901091318986132033L; 41 42 53 public static Buffer decorate(Buffer buffer, Transformer transformer) { 54 return new TransformedBuffer(buffer, transformer); 55 } 56 57 68 protected TransformedBuffer(Buffer buffer, Transformer transformer) { 69 super(buffer, transformer); 70 } 71 72 77 protected Buffer getBuffer() { 78 return (Buffer) collection; 79 } 80 81 public Object get() { 83 return getBuffer().get(); 84 } 85 86 public Object remove() { 87 return getBuffer().remove(); 88 } 89 90 } 91 | Popular Tags |