--- jsr166/src/jsr166x/Deque.java 2004/12/26 20:13:15 1.4 +++ jsr166/src/jsr166x/Deque.java 2004/12/28 16:15:09 1.5 @@ -8,21 +8,22 @@ package jsr166x; // XXX This belongs import java.util.*; // XXX This import goes away XXX /** - * A linear collection that supports element insertion and removal - * at both ends. The name deque is short for "double ended - * queue" and is usually pronounced "deck". Most Deque + * A linear collection that supports element insertion and removal at + * both ends. The name deque is short for "double ended queue" + * and is usually pronounced "deck". Most Deque * implementations place no fixed limits on the number of elements * they may contain, but this interface supports capacity-restricted * deques as well as those with no fixed size limit. * - *

This interface defines methods to access the elements at both ends of - * the deque. Methods are provided to insert, remove, and examine the - * element. Each of these methods exists in two forms: one throws an - * exception if the operation fails, the other returns a special value (either - * null or false, depending on the operation). The latter - * form of the insert operation is designed specifically for use with - * capacity-restricted Deque implementations; in most implementations, - * insert operations cannot fail. + *

This interface defines methods to access the elements at both + * ends of the deque. Methods are provided to insert, remove, and + * examine the element. Each of these methods exists in two forms: + * one throws an exception if the operation fails, the other returns a + * special value (either null or false, depending on + * the operation). The latter form of the insert operation is + * designed specifically for use with capacity-restricted + * Deque implementations; in most implementations, insert + * operations cannot fail. * *

The twelve methods described above are are summarized in the * follwoing table:

@@ -126,23 +127,24 @@ import java.util.*; // XXX This impor * {@link #peekFirst peekFirst()} * * - *

Note that the {@link #peek peek} method works equally well when a deque - * is used as a queue or a stack; in either case, elements are drawn from the - * beginning of the deque. - * - *

This inteface provides two methods to to remove interior elements, - * {@link #removeFirstOccurrence removeFirstOccurrence} and {@link - * #removeLastOccurrence removeLastOccurrence}. Unlike the {@link List} - * interface, this interface does not provide support for indexed access to - * elements. - * - *

While Deque implementations are not strictly required to - * prohibit the insertion of null elements, they are strongly encouraged to do - * so. Users of any Deque implementations that do allow null - * elements are strongly encouraged not to take advantage of the - * ability to insert nulls. This is so because null is used as a - * special return value by various methods to indicated that the deque is - * empty. + * + *

Note that the {@link #peek peek} method works equally well when + * a deque is used as a queue or a stack; in either case, elements are + * drawn from the beginning of the deque. + * + *

This inteface provides two methods to to remove interior + * elements, {@link #removeFirstOccurrence removeFirstOccurrence} and + * {@link #removeLastOccurrence removeLastOccurrence}. Unlike the + * {@link List} interface, this interface does not provide support for + * indexed access to elements. + * + *

While Deque implementations are not strictly required + * to prohibit the insertion of null elements, they are strongly + * encouraged to do so. Users of any Deque implementations + * that do allow null elements are strongly encouraged not to + * take advantage of the ability to insert nulls. This is so because + * null is used as a special return value by various methods + * to indicated that the deque is empty. * *

Deque implementations generally do not define * element-based versions of the equals and hashCode