|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javautils.dispensers.AbstractDispenser | +--javautils.dispensers.DispenserWithoutDuplicatesDecorator
A Decorator [Gamma1995] that filters out duplicates.
Constructor Summary | |
DispenserWithoutDuplicatesDecorator(Dispenser original)
A new dispenser without duplicates. |
Method Summary | |
java.lang.Object |
pop()
Chooses the next element to be processed, removes it from the dispenser, and returns the element. |
void |
push(java.lang.Object element)
Adds a new element into the dispenser. |
int |
size()
Number of elements in the dispenser. |
Methods inherited from class javautils.dispensers.AbstractDispenser |
isEmpty, notEmpty, pushAll, pushAll, pushAllRight |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DispenserWithoutDuplicatesDecorator(Dispenser original)
A new dispenser without duplicates. The client should never use the original dispenser directly.
Method Detail |
public int size()
Dispenser
Number of elements in the dispenser.
public java.lang.Object pop()
Dispenser
Chooses the next element to be processed, removes it from the dispenser, and returns the element.
public void push(java.lang.Object element)
Dispenser
Adds a new element into the dispenser.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |