|
INRIA & FluxMedia | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector
fr.fluxmedia.transmorpher.utils.Fifo
public class Fifo
Field Summary | |
---|---|
private int |
first
The first position at which there is unpoped value |
private int |
last
The last position at which there is no value |
Fields inherited from class java.util.Vector |
---|
capacityIncrement, elementCount, elementData |
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
Fifo()
Creates an empty Fifo |
Method Summary | |
---|---|
void |
clear()
Empties the Fifo |
boolean |
isEmpty()
Test if the Fifo is empty |
java.lang.Object |
peek()
Returns the first element of the Fifo (which is left unchanged) |
java.lang.Object |
pop()
Returns the first element of the Fifo which is withdrawn |
void |
push(java.lang.Object item)
Pushes an item onto the top of the Fifo |
void |
removeAllElements()
Empties the Fifo |
int |
search(java.lang.Object item)
Returns the 1-based position where the object item is in the Fifo. |
int |
size()
Returns the number of elements in the Fifo |
Methods inherited from class java.util.Vector |
---|
add, add, addAll, addAll, addElement, capacity, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, subList, toArray, toArray, toString, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
iterator, listIterator, listIterator |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
iterator, listIterator, listIterator |
Field Detail |
---|
private int first
private int last
Constructor Detail |
---|
public Fifo()
Method Detail |
---|
public void push(java.lang.Object item)
item
- the item to be pushed on the FifoVector.addElement(Object)
public java.lang.Object pop() throws java.util.EmptyStackException
java.util.EmptyStackException
public java.lang.Object peek() throws java.util.EmptyStackException
java.util.EmptyStackException
public boolean isEmpty()
isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.List
isEmpty
in class java.util.Vector
public int size()
size
in interface java.util.Collection
size
in interface java.util.List
size
in class java.util.Vector
public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.List
clear
in class java.util.Vector
public void removeAllElements()
removeAllElements
in class java.util.Vector
public int search(java.lang.Object item)
item
- the item to be found
Vector.addElement(Object)
|
INRIA & FluxMedia | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |