...
BiList<Garment>
is a pile of clothes.insertFront()
andremFront()
are the methods to insert and remove from the top of the pile respectively.insertRear()
andremRear()
are the methods to insert and remove from the bottom of the pile respectively.newIterator()
is a factory method that will create an iterator for you specifically for that list, initialized to point at the first (top) element of the list. Do NOT try to make an iterator by instantiating one yourself!Wiki Markup {\[BiLists}} ({{the super-interface BiListI actually}}) accept {{BiListIVisitors}} that can be used to perform operations that depend on whether the list is empty or not. That is, {{BiListIVisitor}} has 2 cases, {{forEmpty}} and {{forNonEmpty}}.
BiLists
also have anisEmpty()
method that can be used for imperative/procedural-style conditional processing based on the list's emptiness. Using a delegation-style processing using theBiListIVisitor
is recommended however and will result in cleaner code in some cases.
Using the BiIteratorI<Garment>
iterator a BiList<Garment>
creates:
...