Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • BiList<Garment> is a pile of clothes.
  • insertFront() and remFront() are the methods to insert and remove from the top of the pile respectively.
  • insertRear() and remRear() 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}}&nbsp; ({{the super-interface BiListI&nbsp;actually}})&nbsp;accept {{BiListIVisitors}} that can be used to perform operations that depend on whether the list is empty or not.&nbsp;&nbsp; That is, {{BiListIVisitor}} has 2 cases, {{forEmpty}} and {{forNonEmpty}}.&nbsp;&nbsp;
  • BiLists also have an isEmpty() method that can be used for imperative/procedural-style conditional processing based on the list's emptiness.   Using a delegation-style processing using the BiListIVisitor is recommended however and will result in cleaner code in some cases. 

Using the BiIteratorI<Garment> iterator a BiList<Garment> creates:

...