soot.jimple.spark.ondemand.genericutil
Class FIFOQueue

java.lang.Object
  extended by soot.jimple.spark.ondemand.genericutil.FIFOQueue

public final class FIFOQueue
extends Object

A FIFO queue of objects, implemented as a circular buffer. NOTE: elements stored in the buffer should be non-null; this is not checked for performance reasons.

Author:
Manu Sridharan

Constructor Summary
FIFOQueue()
           
FIFOQueue(int initialSize_)
           
 
Method Summary
 boolean add(Object obj_)
          add an element to the bottom of the queue
 void clear()
           
 boolean isEmpty()
           
 Object pop()
           
 boolean push(Object obj_)
           
 Object remove()
          remove the top element from the buffer
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FIFOQueue

public FIFOQueue(int initialSize_)
Parameters:
initialSize_ - the initial size of the queue

FIFOQueue

public FIFOQueue()
Method Detail

push

public boolean push(Object obj_)

add

public boolean add(Object obj_)
add an element to the bottom of the queue


pop

public Object pop()

remove

public Object remove()
remove the top element from the buffer


isEmpty

public boolean isEmpty()

toString

public String toString()
Overrides:
toString in class Object

clear

public void clear()