|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cytoscape.util.intr.IntQueue
public final class IntQueue
A first-in, first-out container of 32 bit integers. In the underlying implementation, the memory consumed by an instance of this class may increase, but does never decrease.
While other container classes in this package are able to hold up to Integer.MAX_VALUE elements, this class is only able to hold Integer.MAX_VALUE-1 elements.
An instance of this class is serializable; however, serialized instances of this class should not be stored in a persistent manner because the serialization implemented in this class makes no attempt at handling class versioning.
Constructor Summary | |
---|---|
IntQueue()
Creates a new queue of integers. |
Method Summary | |
---|---|
int |
dequeue()
Removes and returns the next integer in this queue. |
IntEnumerator |
elements()
Returns an enumeration of all elements currently in this queue. |
void |
empty()
Removes all integers from this queue. |
void |
enqueue(int value)
Inserts a new integer into this queue. |
int |
peek()
A non-mutating operation that retrieves the next integer in this queue. |
int |
size()
Returns the number of integers that are currently in this queue. |
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 final void empty()
public final int size()
public final void enqueue(int value)
public final int peek()
It is considered an error to call this method if there are no integers currently in this queue. If size() returns zero immediately before this method is called, the results of this operation are undefined.
public final int dequeue()
It is considered an error to call this method if there are no integers currently in this queue. If size() returns zero immediately before this method is called, the results of this operation are undefined.
public final IntEnumerator elements()
No operation on this queue will have an effect on the returned enumeration except for enqueue(). If calls to enqueue() are mingled with calls to iterate over the returned enumeration, the contents of this enumeration become undefined. Iterating over the returned enumeration never has an affect on this queue.
|
Cytoscape 2.8.0 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |