|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjitas.core.Subdomain
public class Subdomain
A subdomain object. Subdomains contain problems and solutions, and also can potentially have specific constraints relevant to the subdomain. A domain can have many subdomains, but must have at least one.
Constructor Summary | |
---|---|
Subdomain(java.lang.String name,
java.lang.String description,
java.lang.String domainName)
Constructor -- This is called when the DOM Domain Parser parses the domain |
Method Summary | |
---|---|
boolean |
addProblem(Problem p)
Adds a problem to the List |
int |
compareTo(Subdomain object)
Standard compareTo override, based on the Subdomain name |
boolean |
equals(java.lang.Object object)
Standard equals override, based on the Subdomain name |
java.lang.String |
getDescription()
Returns the description of the subdomain |
java.lang.String |
getName()
Returns the name of the subdomain. |
Problem |
getProblem(int problemNumber)
Gets a problem specified by the problem number |
java.util.SortedMap<java.lang.Integer,Problem> |
getProblems()
Returns the map of problems associated with this subdomain |
Solution |
getSolution(int problemNumber)
|
int |
hashCode()
Standard hashCode override, based on the Subdomain name |
void |
loadProblems()
Load problems for the subdomain from the correct xml file eg domains/ |
java.lang.String |
toString()
Standard toString override |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Subdomain(java.lang.String name, java.lang.String description, java.lang.String domainName)
name
- The subdomain namedescription
- The description of the subdomaindomainName
- The owning domain nameMethod Detail |
---|
public java.lang.String getName()
public java.lang.String getDescription()
public java.util.SortedMap<java.lang.Integer,Problem> getProblems()
public Problem getProblem(int problemNumber)
problemNumber
- The number of the problem you want
public Solution getSolution(int problemNumber)
public boolean addProblem(Problem p) throws ProblemAlreadyExistsException
p
- The problem which is to be stored.
ProblemAlreadyExistsException
public void loadProblems() throws ProblemsNotFoundException
ProblemsNotFoundException
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int compareTo(Subdomain object) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable<Subdomain>
object
- The Object to be compared
java.lang.ClassCastException
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |