Class IntQueue


  • public final class IntQueue
    extends java.lang.Object
    Implementation for a FIFO of int. This class is particularly useful for the implementation of BFS algorithm
    Author:
    freyssj
    • Constructor Summary

      Constructors 
      Constructor Description
      IntQueue()
      Creeates a new Queue with an initial size of 100
      IntQueue​(int size)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()  
      int get​(int ind)  
      int getBegin()  
      int getEnd()  
      int getSize()  
      int indexOf​(int ind)  
      boolean isEmpty()  
      int peek()
      Peek the first element of the Queue (do not increment the queue index)
      int pop()
      Pop the first element of the Queue
      void push​(int i)
      Push an element on top of the queue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IntQueue

        public IntQueue()
        Creeates a new Queue with an initial size of 100
      • IntQueue

        public IntQueue​(int size)
    • Method Detail

      • get

        public final int get​(int ind)
      • getBegin

        public final int getBegin()
      • getEnd

        public final int getEnd()
      • isEmpty

        public final boolean isEmpty()
      • clear

        public final void clear()
      • getSize

        public final int getSize()
      • pop

        public final int pop()
        Pop the first element of the Queue
        Returns:
      • peek

        public final int peek()
        Peek the first element of the Queue (do not increment the queue index)
        Returns:
      • push

        public void push​(int i)
        Push an element on top of the queue
        Parameters:
        i -
      • indexOf

        public int indexOf​(int ind)