org.jutil.java.collections
Class AbstractDispenser
java.lang.Object
|
+--org.jutil.java.collections.AbstractDispenser
- All Implemented Interfaces:
- Dispenser
- Direct Known Subclasses:
- AbstractFifo, AbstractPriorityQueue, Stack
- public abstract class AbstractDispenser
- extends java.lang.Object
- implements Dispenser
AbstractDispenser provides an implementation for the add method
that always returns true and delegates to an abstract method
for the actual adding.
|
Method Summary |
boolean |
add(java.lang.Object item)
See superclass. |
protected abstract void |
addImpl(java.lang.Object item)
Add the given item to this Dispenser. |
boolean |
isEmpty()
Temporary substitue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CVS_REVISION
public static final java.lang.String CVS_REVISION
AbstractDispenser
public AbstractDispenser()
add
public final boolean add(java.lang.Object item)
- See superclass.
FIXME
- Specifications inherited from overridden method in interface Dispenser:
-
public behavior
requires item != null;
ensures nbExplicitOccurrences(item) == \old(nbExplicitOccurrences(item))+1;
ensures \result == true;
addImpl
protected abstract void addImpl(java.lang.Object item)
- Add the given item to this Dispenser.
- Parameters:
item - the item to be added
- Specifications:
-
public behavior
requires item != null;
ensures nbExplicitOccurrences(item) == \old(nbExplicitOccurrences(item))+1;
isEmpty
public boolean isEmpty()
- Temporary substitue
- Specifications inherited from overridden method in interface Dispenser:
--- None ---