Package algs13
Class Bag<T>
java.lang.Object
algs13.Bag<T>
- All Implemented Interfaces:
- Iterable<T>
The 
Bag class represents a bag (or multiset) of
  generic items. It supports insertion and iterating over the
  items in arbitrary order.
  The add, isEmpty, and size operation take constant time. Iteration takes time proportional to the number of items.
For additional documentation, see Section 1.3 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
- 
Nested Class SummaryNested Classes
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliterator
- 
Field Details- 
N
- 
first
 
- 
- 
Constructor Details- 
Bagpublic Bag()Create an empty stack.
 
- 
- 
Method Details