public class Lot extends Product
Modifier and Type | Field and Description |
---|---|
static int |
AUCTION_IS_OVER |
private URLDescriptor |
auctionCD |
private boolean |
auctionHasStarted
auctionStarted
|
static int |
CALLING_FOR_BIDS |
private URLDescriptor |
currentBidder |
static int |
GOING_ONCE |
static int |
GOING_TWICE |
int |
goingGoingGone |
static int |
GONE |
private boolean |
highestBidder
For use by bidding agents with multiple bids on different products, potentially
|
private boolean |
isLocked |
private URLDescriptor |
previousBidder |
private Integer |
startingBid
Keep track of the best bid so far.
|
Constructor and Description |
---|
Lot() |
Lot(Product product,
URLDescriptor url) |
Lot(String name,
Integer price,
URLDescriptor url) |
Lot(String name,
Integer price,
URLDescriptor url,
Integer startingBid,
URLDescriptor currentBidder,
URLDescriptor previousBidder) |
Modifier and Type | Method and Description |
---|---|
boolean |
auctionHasStarted() |
boolean |
biddingIsLocked() |
void |
fromString(String str)
Used for the purpose of serialization.
|
URLDescriptor |
getAuctionCD() |
URLDescriptor |
getCurrentBidder() |
URLDescriptor |
getPreviousBidder() |
Integer |
getStartingBid() |
boolean |
isHighestBidder() |
void |
lockBidding() |
void |
setBiddingLock(boolean lock) |
void |
setCurrentBidder(URLDescriptor bidder) |
void |
setHighestBidder(boolean highest) |
void |
startAuction() |
String |
toString() |
void |
unlockBidding() |
void |
update(Lot lot) |
getName, getPrice, isAcquiring, isForSale, setAcquiring, setForSale, setName, setPrice
public static final int CALLING_FOR_BIDS
public static final int GOING_ONCE
public static final int GOING_TWICE
public static final int GONE
public static final int AUCTION_IS_OVER
public int goingGoingGone
private URLDescriptor auctionCD
private boolean isLocked
private boolean auctionHasStarted
private boolean highestBidder
private Integer startingBid
private URLDescriptor currentBidder
private URLDescriptor previousBidder
public Lot()
public Lot(Product product, URLDescriptor url)
public Lot(String name, Integer price, URLDescriptor url)
public Lot(String name, Integer price, URLDescriptor url, Integer startingBid, URLDescriptor currentBidder, URLDescriptor previousBidder)
public void update(Lot lot)
public URLDescriptor getAuctionCD()
public boolean biddingIsLocked()
public void setBiddingLock(boolean lock)
public void lockBidding()
public void unlockBidding()
public boolean auctionHasStarted()
public void startAuction()
public boolean isHighestBidder()
public void setHighestBidder(boolean highest)
public void setCurrentBidder(URLDescriptor bidder)
public Integer getStartingBid()
public URLDescriptor getCurrentBidder()
public URLDescriptor getPreviousBidder()
public void fromString(String str)
fromString
in class Product
str
-