package Queue; import java.util.*; /** * Interface UniqueQueue builds on Queue by having the capability * to remove a specified item from the middle of the queue. * One can quickly test if an item is inside the queue. * A restriction is that one cannot insert the same item multiple * times into the queue. * * @see Queue.Queue * * @author Thomas Wang * @version 0.55 */ public abstract interface UniqueQueue extends Queue { /** * Returns true if the specified element is inside the queue. * False is returned otherwise. * * @param element the specified element * @return true or false */ public boolean isInside(Object element); /** * Remove the specified element from the queue. If the element * is not inside the queue, then exception NoSuchElementException * will be thrown. * * @param element the specified element * @exception NoSuchElementException thrown when specified element * is not inside the queue. */ public void removeElement(Object element) throws NoSuchElementException; }