|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectIntQueue
public class IntQueue
A IntQueue holds a sequence of int objects and provides access to them in the order that they were added to the sequence.
Constructor Summary | |
---|---|
IntQueue()
new IntQueue() returns a new, empty queue for ints. |
Method Summary | |
---|---|
void |
add(int i)
q.add(i) adds i to q. |
int |
get()
q.get() returns the current item of q. |
int |
getCount()
q.getCount() the number of items in q. |
void |
remove()
q.remove() removes the current item of q. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IntQueue()
Method Detail |
---|
public int getCount()
public void add(int i)
public int get()
Precondition: q.getCount() > 0.
public void remove()
Precondition: q.getCount() > 0.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |