nl.justobjects.toolkit.collection
Class Queue
java.lang.Object
|
+--nl.justobjects.toolkit.collection.Queue
- public class Queue
- extends java.lang.Object
Simple implementation of FIFO Queue.
Purpose
This class can be used to store java.lang.Objects in a FIFO queue.
Implementation
Implemented using an array.
Examples
$Source: /var/cvs/justobjects/toolkit/src/nl/justobjects/toolkit/collection/Queue.java,v $
- Version:
- $Id: Queue.java,v 1.3 2003/01/06 00:23:48 just Exp $
- Author:
- $Author: just $ - Just van den Broecke - Just Objects ©
Field Summary |
(package private) int |
capacity
|
(package private) int |
front
|
(package private) java.lang.Object[] |
queue
|
(package private) int |
rear
|
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
capacity
int capacity
queue
java.lang.Object[] queue
front
int front
rear
int rear
Queue
public Queue()
Queue
public Queue(int capacity)
enQueue
public boolean enQueue(java.lang.Object item)
deQueue
public java.lang.Object deQueue()
getCapacity
public int getCapacity()
getFront
public int getFront()
getRear
public int getRear()
isEmpty
public boolean isEmpty()
isFull
public boolean isFull()
next
private int next(int index)
Copyright © 2000-2001 - Just Objects B.V.