All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class Acme.DQueue

java.lang.Object
   |
   +----Acme.FlexVector
           |
           +----Acme.Queue
                   |
                   +----Acme.DQueue

public class DQueue
extends Queue
Simple double-ended queue class.

Similar to Acme.Queue, except you can add and remove from either end.

Fetch the software.
Fetch the entire Acme package.


Constructor Index

 o DQueue()

Method Index

 o addFront(Object)
Adds an item to the front of the queue.
 o getBack()
Gets an item off the back of the queue.
 o peekBack()
Peeks at the back of the queue.

Constructors

 o DQueue
 public DQueue()

Methods

 o addFront
 public Object addFront(Object item)
Adds an item to the front of the queue.

Why does it return the item? Because Stack.push() does.

 o getBack
 public Object getBack()
Gets an item off the back of the queue.

 o peekBack
 public Object peekBack()
Peeks at the back of the queue.


All Packages  Class Hierarchy  This Package  Previous  Next  Index

ACME Java  ACME Labs