Packages

c

o1.auctionhouse

AuctionHouse

class AuctionHouse extends AnyRef

The class AuctionHouse represents electronic auction houses. It provides methods for adding auctions and producing statistics about the items being sold, among other things.

This version of class AuctionHouse allows for various ways of selling items: any objects of type ItemForSale may be added to the auction house.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AuctionHouse
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new AuctionHouse(name: String)

    name

    the name of the auction house

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def addItem(item: ItemForSale): Unit

    Adds the given item to the auction house.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def averagePrice: Double

    Returns the current average price of all the items that have been put up for sale in this auction house.

    Returns the current average price of all the items that have been put up for sale in this auction house. The average is computed from the prices of all items, be they open or closed.

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. val name: String
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def nextDay(): Unit

    Records one day as having passed.

    Records one day as having passed. This is equivalent to calling item.advanceOneDay() for each of the items in this auction house.

    See also

    ItemForSale.advanceOneDay

  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. def numberOfOpenItems: Int

    Returns the number of items in this auction house that are currently open.

  19. def priciest: Option[ItemForSale]

    Returns the priciest item in the auction house, that is, the item whose current price is the highest.

    Returns the priciest item in the auction house, that is, the item whose current price is the highest. Both open and closed items are considered. The item is returned in an Option wrapper; if there are no auctions at all, None is returned.

  20. def purchasesOf(buyer: String): Vector[ItemForSale]

    Returns a collection that contains the purchases of a single buyer.

    Returns a collection that contains the purchases of a single buyer. This means all the (open or closed) items that have either already been bought by the given person, or that have the person as the highest bidder.

    buyer

    the name of the buyer whose purchases should be returned

    returns

    a new buffer containing the items

  21. def removeItem(item: ItemForSale): Unit

    Removes the given item from the auction house, assuming it was there.

  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. def toString: String

    Produces a textual representation of this auction house.

    Produces a textual representation of this auction house.

    Definition Classes
    AuctionHouse → AnyRef → Any
  24. def totalPrice: Int

    Returns the current total price of all the items that have been put up for sale in this auction house.

    Returns the current total price of all the items that have been put up for sale in this auction house. The total includes the prices of all items, be they open or closed.

  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @deprecated
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped