public class BidDetails extends java.lang.Object implements java.lang.Comparable<BidDetails>, java.io.Serializable
| Constructor and Description |
|---|
BidDetails(Bid bid,
double myUndiscountedUtil)
Creates a BidDetails-object which stores a bid with it's corresponding utility.
|
BidDetails(Bid bid,
double myUndiscountedUtil,
double time)
Creates a BidDetails-object which stores a bid with it's corresponding
utility and the time it was offered.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(BidDetails other)
A comparator for BidDetails which order the bids in
reverse natural order of utility.
|
boolean |
equals(java.lang.Object obj) |
Bid |
getBid()
Returns the bid.
|
double |
getMyUndiscountedUtil()
Returns the undiscounted utility of the bid as supplied in the
constructor.
|
double |
getTime()
Return the time at which this bid was offered.
|
int |
hashCode() |
void |
setBid(Bid bid)
Set the bid.
|
void |
setMyUndiscountedUtil(double utility)
Set the undiscounted utility of the bid.
|
void |
setTime(double time)
Set the time at which this bid was offered.
|
java.lang.String |
toString() |
public BidDetails(Bid bid, double myUndiscountedUtil)
bid - of an agentmyUndiscountedUtil - utility of the bidpublic BidDetails(Bid bid, double myUndiscountedUtil, double time)
bid - of an agentmyUndiscountedUtil - of the bidtime - of offeringpublic Bid getBid()
public void setBid(Bid bid)
bid - to be set in this object.public double getMyUndiscountedUtil()
public void setMyUndiscountedUtil(double utility)
utility - of the bid.public double getTime()
public void setTime(double time)
time - of offering.public java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(BidDetails other)
compareTo in interface java.lang.Comparable<BidDetails>other - bid to which this bid is compared.public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - object to which this object is compared.