Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## Util.Structures
Class Queue<T>

    java.lang.Object
      Util.Structures.Queue<T>

    public class Queue<T>

extends java.lang.Object

A FIFO queue implementation containting a linked list

Constructor Summary
`Queue()` Create queue

Method Summary
`T` | `dequeue()` Remove first element.
`T` | `enqueue(T element)` add element to end of items
`boolean` | `isEmpty()` Check if queue is empty

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Queue

    public Queue()

  Create queue

Method Detail

### enqueue

    public T enqueue(T element)

  add element to end of items

  Parameters:
    `element` - element to add
  Returns:
    added element

### dequeue

    public T dequeue()

  Remove first element.

  Returns:
    first element
  Throws:
    `java.util.NoSuchElementException` - if size is 0

### isEmpty

    public boolean isEmpty()

  Check if queue is empty

  Returns:
    true if it is empty

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD