|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjitas.core.Problem
public class Problem
Create a Problem object which contains the necessary information.
Constructor Summary | |
---|---|
Problem()
Constructor-- Initialize the variables |
Method Summary | |
---|---|
int |
compareTo(Problem object)
Standard compareTo override, based on the Problem id |
boolean |
equals(java.lang.Object object)
Standard equals override, based on the Problem id |
java.util.Map<java.lang.String,java.lang.String> |
getAdditionalData()
Get the additional data associated with a problem |
int |
getDifficulty()
Get the difficulty of a Problem |
int |
getId()
Get the id of a Problem |
java.lang.String |
getProblemStatement()
Get the problemStatement of a Problem |
java.lang.String |
getShortName()
Get the short name of a problem |
Solution |
getSolution()
Get the solution of a Problem |
int |
hashCode()
Standard hashCode override, based on the Problem id |
void |
setAdditionalData(java.util.Map<java.lang.String,java.lang.String> additionalData)
Set the additional data associated with a problem |
void |
setDifficulty(int difficulty)
Set the difficulty of a Problem |
void |
setId(int id)
Set the id of a Problem |
void |
setProblemStatement(java.lang.String problemStatement)
Set the problemStatement of a Problem |
void |
setShortName(java.lang.String shortName)
Set the short name of a problem |
void |
setSolution(Solution solution)
Set the solution of a Problem |
void |
setSolution(java.lang.String s)
Set the solution to a problem |
java.lang.String |
toString()
Convert a problem to the XML format |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Problem()
Method Detail |
---|
public void setId(int id)
id
- The id of a problempublic void setDifficulty(int difficulty)
difficulty
- The difficulty level of a problempublic void setProblemStatement(java.lang.String problemStatement)
problemStatement
- The statement of a problempublic void setSolution(Solution solution)
solution
- The correct solution of problempublic void setSolution(java.lang.String s)
s
- The solution of a problem in string format
InvalidSolutionException
public int getId()
public int getDifficulty()
public java.lang.String getProblemStatement()
public Solution getSolution()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
public int compareTo(Problem object) throws java.lang.ClassCastException
compareTo
in interface java.lang.Comparable<Problem>
object
- the Object to be compared
java.lang.ClassCastException
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getShortName()
public void setShortName(java.lang.String shortName)
shortName
- The short name of a problempublic java.util.Map<java.lang.String,java.lang.String> getAdditionalData()
public void setAdditionalData(java.util.Map<java.lang.String,java.lang.String> additionalData)
additionalData
- The additional data associated with a problem
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |