Package org.eclipse.mat.collect
Class QueueInt
java.lang.Object
org.eclipse.mat.collect.QueueInt
A simple queue of ints
- Since:
- 0.8
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
QueueInt
public QueueInt(int capacity) Create a queue of specified initial capacity. The queue can grow if required.- Parameters:
capacity
- the initial capacity
-
-
Method Details
-
get
public final int get()Retrieve the next element from the queue.- Returns:
- the next element
-
size
public final int size()The number of elements available for retrieval.- Returns:
- the size
-
put
public final void put(int x) Add an element to the back of the queue.- Parameters:
x
- the element to add
-