|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.cosylab.epics.caj.util.ArrayFIFO
public class ArrayFIFO
FIFO "stack".
| Constructor Summary | |
|---|---|
ArrayFIFO()
Constructs an empty array deque with an initial capacity sufficient to hold 16 elements. |
|
ArrayFIFO(int numElements)
Constructs an empty array deque with an initial capacity sufficient to hold the specified number of elements. |
|
| Method Summary | |
|---|---|
void |
addFirst(Object e)
Inserts the specified element at the front of this deque. |
void |
addLast(Object e)
Inserts the specified element at the end of this deque. |
void |
clear()
Removes all of the elements from this deque. |
boolean |
isEmpty()
Returns true if this deque contains no elements. |
Object |
peek()
Looks at the object at the top of this stack without removing it from the stack. |
Object |
peekFirst()
|
Object |
peekLast()
|
Object |
pollFirst()
|
Object |
pollLast()
|
Object |
pop()
Pops an element from the stack represented by this deque. |
void |
push(Object e)
Pushes an element onto the stack represented by this deque. |
boolean |
remove(Object o)
Removes the first occurrence of the specified element in this deque (when traversing the deque from head to tail). |
int |
size()
Returns the number of elements in this deque. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayFIFO()
public ArrayFIFO(int numElements)
numElements - lower bound on initial capacity of the deque| Method Detail |
|---|
public void addFirst(Object e)
e - the element to add
NullPointerException - if the specified element is nullpublic void addLast(Object e)
This method is equivalent to #add.
e - the element to add
NullPointerException - if the specified element is nullpublic Object pollFirst()
public Object pollLast()
public Object peekFirst()
public Object peekLast()
public void push(Object e)
e - the element to push
NullPointerException - if the specified element is nullpublic Object pop()
null if no element available.public Object peek()
public int size()
public boolean isEmpty()
public void clear()
public boolean remove(Object o)
o - element to be removed from this deque, if present
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||