Class QueueInt

java.lang.Object
org.eclipse.mat.collect.QueueInt

public class QueueInt extends Object
A simple queue of ints
Since:
0.8
  • Constructor Summary

    Constructors
    Constructor
    Description
    QueueInt(int capacity)
    Create a queue of specified initial capacity.
  • Method Summary

    Modifier and Type
    Method
    Description
    final int
    get()
    Retrieve the next element from the queue.
    final void
    put(int x)
    Add an element to the back of the queue.
    final int
    The number of elements available for retrieval.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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