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

## dataStructures
Class LinkedQueue

    java.lang.Object
      |
      +--dataStructures.LinkedQueue

public class LinkedQueue
extends java.lang.Object
implements Queue

Field Summary
`protected dataStructures.ChainNode` | `front`
`protected dataStructures.ChainNode` | `rear`

Constructor Summary
`LinkedQueue()`
`LinkedQueue(int initialCapacity)` create an empty queue

Method Summary
`java.lang.Object` | `getFrontElement()`
`java.lang.Object` | `getRearElement()`
`boolean` | `isEmpty()`
`static void` | `main(java.lang.String[] args)` test program
`void` | `put(java.lang.Object theElement)` insert theElement at the rear of the queue
`java.lang.Object` | `remove()` remove an element from the front of the queue

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

Field Detail

### front

    protected dataStructures.ChainNode front

### rear

    protected dataStructures.ChainNode rear

Constructor Detail

### LinkedQueue

    public LinkedQueue(int initialCapacity)

  create an empty queue

### LinkedQueue

    public LinkedQueue()

Method Detail

### isEmpty

    public boolean isEmpty()

  Specified by:
    isEmpty in interface Queue
  Returns:
    true iff queue is empty

### getFrontElement

    public java.lang.Object getFrontElement()

  Specified by:
    getFrontElement in interface Queue
  Returns:
    the element at the front of the queue

### getRearElement

    public java.lang.Object getRearElement()

  Specified by:
    getRearElement in interface Queue
  Returns:
    the element at the rear of the queue

### put

    public void put(java.lang.Object theElement)

  insert theElement at the rear of the queue
  Specified by:
    put in interface Queue

### remove

    public java.lang.Object remove()

  remove an element from the front of the queue
  Specified by:
    remove in interface Queue
  Returns:
    removed element

### main

    public static void main(java.lang.String[] args)

  test program

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