|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Accumulator<E>
This interface define object like FIFO and LIFO. With this type of object we can make add, remove and look next element operation but you can't make random access or know if an object is already present.
Method Summary | |
---|---|
void |
clear()
Remove all the elements of the data structure. |
E |
get()
Remove and give the first object of the data structure. |
boolean |
isEmpty()
Tell if the data structure contains element. |
E |
look()
Give the next element return by get() without removing it from the
data structure. |
void |
put(E o)
Add a object to the data structure. |
int |
size()
Return the number of element contained in the data structure. |
Method Detail |
---|
E get()
java.util.NoSuchElementException
- If the data structure is empty.E look()
get()
without removing it from the
data structure.
get()
}.void put(E o)
o
- The object to add.boolean isEmpty()
true
if the data structure is empty and
false
otherwise.void clear()
int size()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |