All pastes #793534 Raw Edit

Jeff

public java v1 · immutable
·published 2007-11-22 11:15 UTC
rendered paste body
    public void printUnsold()    {        ArrayList<Lot> unsoldLots = getUnsold(); // Initialise arraylist// Make temporary arraylist for unsolt lots of type Lot        for(Lot tmp : unsoldLots) {            System.out.println(tmp.toString());        }            }        /**     * Show only unsold     */    public ArrayList<Lot> getUnsold()    {          ArrayList<Lot> unsoldLots = new ArrayList<Lot>(); // Initialise arraylist// Make temporary arraylist for unsolt lots of type Lot                 Iterator<Lot> it = lots.iterator(); // Iterate through lots abd refer to each temporary iteration as "it"          while(it.hasNext()) {              Lot tmpLot = it.next();              if (tmpLot.getHighestBid() == null) {                unsoldLots.add(tmpLot);              }             }             return unsoldLots;        }