public class Domain
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Domain()
Creates an empty domain.
|
Domain(java.io.File filename)
read a domain from a file.
|
Domain(SimpleElement root)
Creates a domain given an XML-representation of the domain.
|
Domain(java.lang.String filename)
Creates a domain given the path to a file with an XML-representation.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
Objective |
getIssue(int index)
Returns an issue with a given index.
|
java.util.ArrayList<Issue> |
getIssues()
Returns all issues as an arraylist.
|
java.lang.String |
getName() |
long |
getNumberOfPossibleBids()
get number of all possible bids.
|
Objective |
getObjective(int ID) |
java.util.ArrayList<Objective> |
getObjectives() |
Objective |
getObjectivesRoot() |
Bid |
getRandomBid()
KH 070511: Moved to here since it is generic method that can be made available to all agents.
|
Bid |
getRandomBid(java.util.Random r)
KH 070511: Moved to here since it is generic method that can be made available to all agents.
|
SimpleElement |
getXMLRoot() |
int |
hashCode() |
void |
setObjectivesRoot(Objective ob)
Sets a new domain root.
|
SimpleElement |
toXML()
Creates an XML representation of this domain.
|
public Domain()
public Domain(SimpleElement root)
root
- XML-representation of the domain.public Domain(java.lang.String filename) throws java.lang.Exception
filename
- java.lang.Exception
public Domain(java.io.File filename) throws java.lang.Exception
filename
- java.lang.Exception
- ifpublic SimpleElement getXMLRoot()
public final Objective getIssue(int index)
index
- of the issue.public final Objective getObjective(int ID)
ID
- (number) of the objectivepublic final Objective getObjectivesRoot()
public final void setObjectivesRoot(Objective ob)
ob
- The new root Objectivepublic final Bid getRandomBid()
public final Bid getRandomBid(java.util.Random r)
r
- random variablepublic SimpleElement toXML()
null
when there was an error.public java.util.ArrayList<Objective> getObjectives()
public java.util.ArrayList<Issue> getIssues()
public long getNumberOfPossibleBids()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String getName()