jdk/src/share/classes/java/util/Queue.java
author yhuang
Thu, 20 Dec 2012 18:53:46 -0800
changeset 14857 b6bde5174807
parent 9242 ef138d47df58
child 19187 5aa85bc92303
permissions -rw-r--r--
7195759: ISO 4217 Amendment 154 Reviewed-by: naoto
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
     2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * under the terms of the GNU General Public License version 2 only, as
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     6
 * published by the Free Software Foundation.  Oracle designates this
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * particular file as subject to the "Classpath" exception as provided
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     8
 * by Oracle in the LICENSE file that accompanied this code.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    19
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    20
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    22
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
 * This file is available under and governed by the GNU General Public
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 * License version 2 only, as published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 * However, the following notice accompanied the original version of this
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 * file:
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * Written by Doug Lea with assistance from members of JCP JSR-166
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * Expert Group and released to the public domain, as explained at
9242
ef138d47df58 7034657: Update Creative Commons license URL in legal notices
dl
parents: 5506
diff changeset
    33
 * http://creativecommons.org/publicdomain/zero/1.0/
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
package java.util;
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
/**
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * A collection designed for holding elements prior to processing.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * Besides basic {@link java.util.Collection Collection} operations,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * queues provide additional insertion, extraction, and inspection
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * operations.  Each of these methods exists in two forms: one throws
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * an exception if the operation fails, the other returns a special
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * value (either <tt>null</tt> or <tt>false</tt>, depending on the
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * operation).  The latter form of the insert operation is designed
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * specifically for use with capacity-restricted <tt>Queue</tt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * implementations; in most implementations, insert operations cannot
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * fail.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * <p>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * <table BORDER CELLPADDING=3 CELLSPACING=1>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 *  <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 *    <td></td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 *    <td ALIGN=CENTER><em>Throws exception</em></td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 *    <td ALIGN=CENTER><em>Returns special value</em></td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 *  </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 *  <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 *    <td><b>Insert</b></td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 *    <td>{@link #add add(e)}</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 *    <td>{@link #offer offer(e)}</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 *  </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 *  <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 *    <td><b>Remove</b></td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 *    <td>{@link #remove remove()}</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
 *    <td>{@link #poll poll()}</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 *  </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 *  <tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 *    <td><b>Examine</b></td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
 *    <td>{@link #element element()}</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
 *    <td>{@link #peek peek()}</td>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
 *  </tr>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 * </table>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
 * <p>Queues typically, but do not necessarily, order elements in a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
 * FIFO (first-in-first-out) manner.  Among the exceptions are
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
 * priority queues, which order elements according to a supplied
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
 * comparator, or the elements' natural ordering, and LIFO queues (or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
 * stacks) which order the elements LIFO (last-in-first-out).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
 * Whatever the ordering used, the <em>head</em> of the queue is that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
 * element which would be removed by a call to {@link #remove() } or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
 * {@link #poll()}.  In a FIFO queue, all new elements are inserted at
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
 * the <em> tail</em> of the queue. Other kinds of queues may use
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
 * different placement rules.  Every <tt>Queue</tt> implementation
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
 * must specify its ordering properties.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
 * <p>The {@link #offer offer} method inserts an element if possible,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
 * otherwise returning <tt>false</tt>.  This differs from the {@link
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
 * java.util.Collection#add Collection.add} method, which can fail to
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
 * add an element only by throwing an unchecked exception.  The
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
 * <tt>offer</tt> method is designed for use when failure is a normal,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
 * rather than exceptional occurrence, for example, in fixed-capacity
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
 * (or &quot;bounded&quot;) queues.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
 * <p>The {@link #remove()} and {@link #poll()} methods remove and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
 * return the head of the queue.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
 * Exactly which element is removed from the queue is a
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
 * function of the queue's ordering policy, which differs from
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
 * implementation to implementation. The <tt>remove()</tt> and
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
 * <tt>poll()</tt> methods differ only in their behavior when the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
 * queue is empty: the <tt>remove()</tt> method throws an exception,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
 * while the <tt>poll()</tt> method returns <tt>null</tt>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
 * <p>The {@link #element()} and {@link #peek()} methods return, but do
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
 * not remove, the head of the queue.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
 * <p>The <tt>Queue</tt> interface does not define the <i>blocking queue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
 * methods</i>, which are common in concurrent programming.  These methods,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
 * which wait for elements to appear or for space to become available, are
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
 * defined in the {@link java.util.concurrent.BlockingQueue} interface, which
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
 * extends this interface.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
 * <p><tt>Queue</tt> implementations generally do not allow insertion
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
 * of <tt>null</tt> elements, although some implementations, such as
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
 * {@link LinkedList}, do not prohibit insertion of <tt>null</tt>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
 * Even in the implementations that permit it, <tt>null</tt> should
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
 * not be inserted into a <tt>Queue</tt>, as <tt>null</tt> is also
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
 * used as a special return value by the <tt>poll</tt> method to
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
 * indicate that the queue contains no elements.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
 * <p><tt>Queue</tt> implementations generally do not define
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
 * element-based versions of methods <tt>equals</tt> and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
 * <tt>hashCode</tt> but instead inherit the identity based versions
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
 * from class <tt>Object</tt>, because element-based equality is not
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
 * always well-defined for queues with the same elements but different
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
 * ordering properties.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
 * <p>This interface is a member of the
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
 * <a href="{@docRoot}/../technotes/guides/collections/index.html">
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
 * Java Collections Framework</a>.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
 * @see java.util.Collection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
 * @see LinkedList
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
 * @see PriorityQueue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
 * @see java.util.concurrent.LinkedBlockingQueue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
 * @see java.util.concurrent.BlockingQueue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
 * @see java.util.concurrent.ArrayBlockingQueue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
 * @see java.util.concurrent.LinkedBlockingQueue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
 * @see java.util.concurrent.PriorityBlockingQueue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
 * @since 1.5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
 * @author Doug Lea
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
 * @param <E> the type of elements held in this collection
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
public interface Queue<E> extends Collection<E> {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
     * Inserts the specified element into this queue if it is possible to do so
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
     * immediately without violating capacity restrictions, returning
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
     * <tt>true</tt> upon success and throwing an <tt>IllegalStateException</tt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
     * if no space is currently available.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
     * @param e the element to add
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
     * @return <tt>true</tt> (as specified by {@link Collection#add})
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
     * @throws IllegalStateException if the element cannot be added at this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
     *         time due to capacity restrictions
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
     * @throws ClassCastException if the class of the specified element
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
     *         prevents it from being added to this queue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
     * @throws NullPointerException if the specified element is null and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
     *         this queue does not permit null elements
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
     * @throws IllegalArgumentException if some property of this element
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
     *         prevents it from being added to this queue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
    boolean add(E e);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
     * Inserts the specified element into this queue if it is possible to do
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
     * so immediately without violating capacity restrictions.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
     * When using a capacity-restricted queue, this method is generally
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
     * preferable to {@link #add}, which can fail to insert an element only
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
     * by throwing an exception.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
     * @param e the element to add
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
     * @return <tt>true</tt> if the element was added to this queue, else
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
     *         <tt>false</tt>
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
     * @throws ClassCastException if the class of the specified element
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
     *         prevents it from being added to this queue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
     * @throws NullPointerException if the specified element is null and
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
     *         this queue does not permit null elements
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
     * @throws IllegalArgumentException if some property of this element
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
     *         prevents it from being added to this queue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
    boolean offer(E e);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
     * Retrieves and removes the head of this queue.  This method differs
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
     * from {@link #poll poll} only in that it throws an exception if this
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
     * queue is empty.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
     * @return the head of this queue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
     * @throws NoSuchElementException if this queue is empty
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
    E remove();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
     * Retrieves and removes the head of this queue,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
     * or returns <tt>null</tt> if this queue is empty.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
     * @return the head of this queue, or <tt>null</tt> if this queue is empty
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
    E poll();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
     * Retrieves, but does not remove, the head of this queue.  This method
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
     * differs from {@link #peek peek} only in that it throws an exception
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
     * if this queue is empty.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
     * @return the head of this queue
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
     * @throws NoSuchElementException if this queue is empty
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
    E element();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
    /**
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
     * Retrieves, but does not remove, the head of this queue,
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
     * or returns <tt>null</tt> if this queue is empty.
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
     *
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
     * @return the head of this queue, or <tt>null</tt> if this queue is empty
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
     */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
    E peek();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
}