Class BrowseList

java.lang.Object
  extended by BrowseList

public class BrowseList
extends java.lang.Object

list of auction listings intended for users. NOTE: The purpose of this code is to illustrate implementation starting from UML class and sequence diagrams. It may be incomplete and may not compile.


Field Summary
private  java.util.ArrayList<AuctionListing> list
          list of AuctionListing objects:
 
Constructor Summary
BrowseList()
          constructs a new BrowseList object.
 
Method Summary
 void addListing(AuctionListing al)
          adds an AuctionListing object to the list
 AuctionListing get(int index)
          return listing at element index
 int size()
          return list size (element count)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list

private java.util.ArrayList<AuctionListing> list
list of AuctionListing objects:

Constructor Detail

BrowseList

public BrowseList()
constructs a new BrowseList object. Called by ActiveList class during getBrowseList(). This class is necessary because users must not be given access to the ActiveList object. It provides a minimal interface for read-only access to list content.

See Also:
ActiveList
Method Detail

addListing

public void addListing(AuctionListing al)
adds an AuctionListing object to the list

Parameters:
al - the auction listing
See Also:
AuctionListing

size

public int size()
return list size (element count)

Returns:
list size (element count)

get

public AuctionListing get(int index)
return listing at element index

Returns:
listing at element index