public class Offer
extends java.lang.Object
Constructor and Description |
---|
Offer(int num_issues)
Creates a new Offer with the specified number of issues.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object ob)
Implementation of the equals method to determine if two offers are equivalent.
|
int |
getIssueCount()
Returns the number of issues in this offer.
|
int[] |
getItem(int index)
Returns an array of integers representing the distribution detailed for the item matched by index.
|
void |
setItem(int index,
int[] state)
Sets an array of integers representing the distribution detailed for the item matched by index.
|
void |
setOffer(Offer copiedOffer)
Sets one offer equal to another offer by performing a deep copy of the second.
|
java.lang.String |
toString()
A method to format Offers in an easy to read String.
|
public Offer(int num_issues)
num_issues
- public int[] getItem(int index)
index
- of item to findpublic int getIssueCount()
public void setItem(int index, int[] state)
index
- state
- The size 3 array of integers representing the distribution of VH items, undecided items, and player items, in that order.public void setOffer(Offer copiedOffer)
copiedOffer
- public boolean equals(java.lang.Object ob)
equals
in class java.lang.Object
ob
- the offer to compare to.public java.lang.String toString()
toString
in class java.lang.Object