1 24 package org.archive.queue; 25 26 import java.util.Iterator ; 27 import java.util.NoSuchElementException ; 28 29 import org.apache.commons.collections.Predicate; 30 31 32 38 public interface Queue<T> { 39 40 43 void enqueue(T obj); 44 45 49 boolean isEmpty(); 50 51 56 T dequeue() throws NoSuchElementException ; 57 58 62 long length(); 63 64 67 void release(); 68 69 75 T peek(); 76 77 82 void unpeek(); 83 84 94 Iterator <T> getIterator(boolean inCacheOnly); 95 96 105 long deleteMatchedItems(Predicate matcher); 106 } 107 | Popular Tags |