public class Bid extends java.lang.Object implements XMLable, java.io.Serializable
Bid is a immutable. But you can create modified copies using
putValue(int, Value)
.
Bid should be considered final so do not extend this.
Constructor and Description |
---|
Bid(Bid bid)
This method clones the given bid.
|
Bid(Domain domain)
Create a new empty bid of which the values still must be set.
|
Bid(Domain domainP,
java.util.HashMap<java.lang.Integer,Value> bidP)
createFrom a new bid in a domain.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Bid pBid) |
boolean |
equals(java.lang.Object obj) |
java.util.List<Issue> |
getIssues() |
Value |
getValue(int issueNr) |
java.util.HashMap<java.lang.Integer,Value> |
getValues() |
int |
hashCode() |
Bid |
putValue(int issueId,
Value pValue)
Make a new Bid as the current bid but with the value of the issue with
the given issueID to the given value.
|
java.lang.String |
toString() |
SimpleElement |
toXML() |
public Bid(Domain domain)
public Bid(Domain domainP, java.util.HashMap<java.lang.Integer,Value> bidP)
domainP
- the domain in which the bid is donebidP
- HashMap, which is a set of pairs java.lang.Exception
- if the bid is not a legal bid in the domain.public Bid(Bid bid)
public Value getValue(int issueNr)
issueNr
- number of an issue.java.lang.Exception
- if there exist no issue with the given number.public Bid putValue(int issueId, Value pValue)
issueId
- unique ID of an issue.pValue
- value of the issue.public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(Bid pBid)
pBid
- to which this bid must be compared.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.util.HashMap<java.lang.Integer,Value> getValues()
public java.util.List<Issue> getIssues()
public SimpleElement toXML()
public int hashCode()
hashCode
in class java.lang.Object