--- jsr166/src/jsr166x/Deque.java 2004/09/05 21:28:19 1.1 +++ jsr166/src/jsr166x/Deque.java 2004/09/07 10:37:29 1.2 @@ -19,16 +19,15 @@ import java.util.*; * operations or sublists. * *

A view of a subset of Deque operations can be obtained using - * method {@link #asFIFO} to support only Last-In-First-Out (LIFO) - * stack behavior, as well as method {@link #asFIFO} to support only + * method {@link #asFifoQueue} to support only Last-In-First-Out (LIFO) + * stack behavior, as well as method {@link #asFifoQueue} to support only * First-in-First-Out (FIFO) queue behavior. More commonly, a Deque * is used when various mixtures of LIFO and FIFO operations are * required. * - *

Deques additionally provide a few methods to manipulate elements - * embedded within a deque, proceding from either direction: - * removeFirstOccurrence, replaceFirstOccurrence - * removeLastOccurrence, and replaceLastOccurrence. + *

Deques additionally provide a few methods to remove elements + * embedded within a deque, proceding from either direction using + * removeFirstOccurrence and removeLastOccurrence. * They also support {@link Collection} operations including * contains, iterator, and so on. * @@ -214,47 +213,21 @@ public interface Deque extends Collec boolean removeLastOccurrence(E o); /** - * Replaces the first occurrence of the specified element in this - * deque. If the deque does not contain the element, it is - * unchanged. More formally, replaces the first element e - * such that (o==null ? e==null : o.equals(e)) (if - * such an element exists). - * - * @param oldElement element to be replaced in this deque, if present. - * @param newElement replacement value - * @return true if an element was replaced - */ - public boolean replaceFirstOccurrence(E oldElement, E newElement); - - /** - * Replaces the last occurrence of the specified element in this - * deque. If the deque does not contain the element, it is - * unchanged. More formally, replaces the last element e - * such that (o==null ? e==null : o.equals(e)) (if - * such an element exists). - * - * @param oldElement element to be replaced in this deque, if present. - * @param newElement replacement value - * @return true if an element was replaced - */ - public boolean replaceLastOccurrence(E oldElement, E newElement); - - /** * Returns a view of this deque as a first-in-first-out queue, * mapping {@link Queue#offer} to offerLast, {@link * Queue#poll} to pollFirst, and other operations * accordingly. * @return a first-in-first-out view of this deque. */ - public Queue asFIFO(); + public Queue asFifoQueue(); /** - * Returns a view of this deque as a first-in-Last-out stack, + * Returns a view of this deque as a last-in-first-out stack, * mapping {@link Queue#offer} to offerFirst, {@link * Queue#poll} to pollFirst, and other operations * accordingly. * @return a first-in-last-out view of this deque. */ - public Queue asLIFO(); + public Queue asLifoQueue(); }