agl2.util
Class Queue

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--agl2.util.Queue
All Implemented Interfaces:
java.util.Collection

public class Queue
extends java.util.AbstractCollection

The Queue description.


Nested Class Summary
 class Queue.QueueIterator
           
 
Field Summary
protected  int begin
           
protected  java.lang.Object[] buffer
           
protected  int count
           
protected  int end
           
 
Constructor Summary
Queue()
           
Queue(int initial)
           
 
Method Summary
 boolean add(java.lang.Object o)
           
 void clear()
           
 boolean contains(java.lang.Object o)
           
 boolean containsExactly(java.lang.Object o)
           
 boolean equals(java.lang.Object o)
           
 java.lang.Object first()
           
 java.lang.Object get(int index)
           
 java.lang.Object getFirst()
           
 java.lang.Object getLast()
           
 int indexOf(java.lang.Object o)
           
 java.lang.String internalRep()
           
 boolean isEmpty()
           
 java.util.Iterator iterator()
           
 java.lang.Object last()
           
 void putFirst(java.lang.Object x)
           
 void putLast(java.lang.Object x)
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection c)
           
 boolean retainAll(java.util.Collection c)
           
 int size()
           
 java.lang.Object[] toArray(java.lang.Object[] nb)
           
 java.lang.String toString()
           
 
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, toArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Collection
hashCode
 

Field Detail

buffer

protected java.lang.Object[] buffer

begin

protected int begin

end

protected int end

count

protected int count
Constructor Detail

Queue

public Queue(int initial)

Queue

public Queue()
Method Detail

clear

public void clear()
Specified by:
clear in interface java.util.Collection
Overrides:
clear in class java.util.AbstractCollection

getFirst

public java.lang.Object getFirst()

getLast

public java.lang.Object getLast()

putFirst

public void putFirst(java.lang.Object x)

putLast

public void putLast(java.lang.Object x)

first

public java.lang.Object first()

last

public java.lang.Object last()

get

public java.lang.Object get(int index)

indexOf

public int indexOf(java.lang.Object o)

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.Collection
Overrides:
contains in class java.util.AbstractCollection

containsExactly

public boolean containsExactly(java.lang.Object o)

size

public int size()
Specified by:
size in interface java.util.Collection
Specified by:
size in class java.util.AbstractCollection

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Collection
Overrides:
isEmpty in class java.util.AbstractCollection

toString

public java.lang.String toString()
Overrides:
toString in class java.util.AbstractCollection

internalRep

public java.lang.String internalRep()

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.util.Collection
Specified by:
iterator in class java.util.AbstractCollection

add

public boolean add(java.lang.Object o)
Specified by:
add in interface java.util.Collection
Overrides:
add in class java.util.AbstractCollection

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.util.Collection
Overrides:
equals in class java.lang.Object

remove

public boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection
Overrides:
remove in class java.util.AbstractCollection

removeAll

public boolean removeAll(java.util.Collection c)
Specified by:
removeAll in interface java.util.Collection
Overrides:
removeAll in class java.util.AbstractCollection

retainAll

public boolean retainAll(java.util.Collection c)
Specified by:
retainAll in interface java.util.Collection
Overrides:
retainAll in class java.util.AbstractCollection

toArray

public java.lang.Object[] toArray(java.lang.Object[] nb)
Specified by:
toArray in interface java.util.Collection
Overrides:
toArray in class java.util.AbstractCollection