1 22 23 package info.monitorenter.util.collections; 24 25 33 public interface IRingBuffer extends java.io.Serializable { 34 35 43 public final class RingBufferException extends RuntimeException { 44 47 private static final long serialVersionUID = 3762255244691714610L; 48 49 50 57 protected RingBufferException(final String msg) { 58 super(msg); 59 } 60 } 61 62 87 public Object add(final Object element) throws IRingBuffer.RingBufferException; 88 89 98 public void clear(); 99 100 106 public int getBufferSize(); 107 108 118 public Object getOldest() throws IRingBuffer.RingBufferException; 119 120 129 public Object getYoungest() throws IRingBuffer.RingBufferException; 130 131 137 public boolean isEmpty(); 138 139 147 public boolean isFull(); 148 149 157 public java.util.Iterator iteratorF2L(); 158 159 166 public java.util.Iterator iteratorL2F(); 167 168 177 public Object remove() throws IRingBuffer.RingBufferException; 178 179 185 public Object [] removeAll(); 186 187 203 public void setBufferSize(final int newSize); 204 205 211 public int size(); 212 213 } 214 | Popular Tags |