Packages

class Bid extends AnyRef

The class Bid represents bids made for items up for auction in an electronic auction house. Each Bid object stores the name of the bidder --- that is, the customer who made the bid --- as well as the maximum amount the bidder is willing to pay for the item.

A bid object may also be created that has no bidder at all. This is useful, because a Bid object with no bidder can now be used for representing the initial prices of auctions before any genuine bids have been made.

A bid object is immutable after creation.

See also

EnglishAuction

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

Instance Constructors

  1. new Bid(bidder: Option[String], limit: Int)

    bidder

    the name of the customer who made the bid, wrapped in an Option, or None if the object represents an initial price with no bidder

    limit

    the maximum sum of money the bidder is willing to pay for the item

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def beats(olderBid: Bid): Boolean

    Determines whether this bid beats the given competing bid.

    Determines whether this bid beats the given competing bid. A bid beats another if it has a higher limit, or if the limits are equal and the other bid is a bidderless initial bid.

  6. val bidder: Option[String]
  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. def isInitialBid: Boolean

    Determines whether this bid is an "bidderless bid" that represents an auction's initial price.

  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. val limit: Int
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  19. def toString: String
    Definition Classes
    AnyRef → Any
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. def winner(olderBid: Bid): Bid

    Checks whether this bid beats the given older bid, and returns one of the two bids accordingly: this bid if it beats the given one, the given bid otherwise.

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