Class IntQueue

java.lang.Object
org.jacop.jasat.utils.structures.IntQueue
All Implemented Interfaces:
Iterable<Integer>

public final class IntQueue extends Object implements Iterable<Integer>
Special class for unboxed int FIFO
Version:
4.8
  • Field Details

    • array

      public int[] array
    • start

      public int start
    • stop

      public int stop
    • pool

      public MemoryPool pool
  • Constructor Details

  • Method Details

    • clear

      public void clear()
    • isEmpty

      public boolean isEmpty()
    • add

      public void add(int element)
      adds an int at the end of the FIFO
      Parameters:
      element - the element to add
    • peek

      public int peek()
      inspection of the first element, without removal
      Returns:
      the first element of the array
    • pop

      public int pop()
      takes the first element, removes it from the FIFO and returns it
      Returns:
      the first element from the FIFO queue
    • size

      public int size()
    • resize

      private void resize()
      increase the size of the queue
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • iterator

      public Iterator<Integer> iterator()
      Specified by:
      iterator in interface Iterable<Integer>