public class BidDetails extends java.lang.Object implements java.lang.Comparable<BidDetails>
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 utbid)
A comperator for BidDetails which order the bids in
reverse natural order of utility.
|
boolean |
equals(java.lang.Object obj) |
Bid |
getBid() |
double |
getMyUndiscountedUtil() |
double |
getTime() |
int |
hashCode() |
void |
setBid(Bid bid) |
void |
setMyUndiscountedUtil(double utility) |
void |
setTime(double t) |
java.lang.String |
toString() |
public BidDetails(Bid bid, double myUndiscountedUtil)
bid
- of an agentundiscounted
- 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)
public double getMyUndiscountedUtil()
public void setMyUndiscountedUtil(double utility)
public double getTime()
public void setTime(double t)
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(BidDetails utbid)
compareTo
in interface java.lang.Comparable<BidDetails>
another
- utbidpublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object