|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfr.inria.opengve.tools.dataStructures.Fifo<E>
E
- The type of element in the FIFO.public class Fifo<E>
This class implement the concept of FIFO. Add ________ Get --->|4|3|2|1|---->
Constructor Summary | |
---|---|
Fifo()
Default constructor. |
Method Summary | |
---|---|
void |
clear()
Removes all the element of this FIFO. |
E |
get()
Return the first element of this FIFO and remove it. |
boolean |
isEmpty()
Tell if the FIFO is empty. |
E |
look()
Return the first element of this FIFO. |
void |
put(E o)
Add an element to this FIFO. |
int |
size()
Give the size of this FIFO. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Fifo()
Method Detail |
---|
public E get()
get
in interface Accumulator<E>
java.util.NoSuchElementException
- If this FIFO is empty.public E look()
look
in interface Accumulator<E>
java.util.NoSuchElementException
- If this FIFO is empty.public void put(E o)
put
in interface Accumulator<E>
o
- The object to add to this FIFO.public boolean isEmpty()
isEmpty
in interface Accumulator<E>
true
if the FIFO is empty and
false otherwise.
public int size()
size
in interface Accumulator<E>
public void clear()
clear
in interface Accumulator<E>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |