gshute.util
Interface Dispenser

All Known Implementing Classes:
ListDispenser

public abstract interface Dispenser

A Dispenser is a collection of entries with a distinguished entry, called the accessible entry, that can be examined or removed.


Method Summary
 void add(java.lang.Object dat)
          disp.add(dat) adds dat to disp.
 void clear()
          disp.clear() removes all entries from disp.
 java.lang.Object data()
          disp.data() returns the accessible entry of disp.
 java.util.Iterator iterator()
          disp.iterator() returns an iterator for the entries of disp.
 boolean more()
          disp.more() returns true if there are more entries in disp.
 void remove()
          disp.remove() removes the accessible entry from disp.
 int size()
          disp.size() returns the number of entries in disp.
 

Method Detail

more

public boolean more()
disp.more() returns true if there are more entries in disp.

size

public int size()
disp.size() returns the number of entries in disp.

add

public void add(java.lang.Object dat)
disp.add(dat) adds dat to disp.

data

public java.lang.Object data()
disp.data() returns the accessible entry of disp.

Precondition: disp.more() is true.


clear

public void clear()
disp.clear() removes all entries from disp.

remove

public void remove()
disp.remove() removes the accessible entry from disp.

Precondition: disp.more() is true.


iterator

public java.util.Iterator iterator()
disp.iterator() returns an iterator for the entries of disp.