ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166x/ArrayDeque.java
(Generate patch)

Comparing jsr166/src/jsr166x/ArrayDeque.java (file contents):
Revision 1.1 by dl, Sun Dec 5 21:15:30 2004 UTC vs.
Revision 1.2 by dl, Sun Dec 26 20:13:15 2004 UTC

# Line 332 | Line 332 | public class ArrayDeque<E> extends Abstr
332       * @return the first element of this deque
333       * @throws NoSuchElementException if this deque is empty
334       */
335 <    public E firstElement() {
335 >    public E getFirst() {
336          E x = elements[head];
337          if (x == null)
338              throw new NoSuchElementException();
# Line 347 | Line 347 | public class ArrayDeque<E> extends Abstr
347       * @return the last element of this deque
348       * @throws NoSuchElementException if this deque is empty
349       */
350 <    public E lastElement() {
350 >    public E getLast() {
351          E x = elements[(tail - 1) & (elements.length - 1)];
352          if (x == null)
353              throw new NoSuchElementException();
# Line 478 | Line 478 | public class ArrayDeque<E> extends Abstr
478       * this deque.  This method differs from the <tt>peek</tt> method only in
479       * that it throws an exception if this deque is empty.
480       *
481 <     * <p>This method is equivalent to {@link #firstElement}
481 >     * <p>This method is equivalent to {@link #getFirst}
482       *
483       * @return the head of the queue represented by this deque
484       * @throws NoSuchElementException if this deque is empty
485       */
486      public E element() {
487 <        return firstElement();
487 >        return getFirst();
488      }
489  
490      // *** Stack methods ***

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines