|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.topcoder.shared.problem.BaseElement
|
+--com.topcoder.shared.problem.Problem
This class contains data for a problem. Each problem consists of a number of
components. The actual program interface data (className, etc.) of each component is
contained in ProblemComponent objects. For single-coder contests, each problem
has only one component.
| Constructor Summary | |
Problem()
Empty constructor required by custom serialization |
|
| Method Summary | |
java.lang.Object |
clone()
Clones the problem object (note: incomplete) |
void |
customReadObject(com.topcoder.shared.netCommon.CSReader reader)
Custom serialization |
void |
customWriteObject(com.topcoder.shared.netCommon.CSWriter writer)
Custom serialization |
static java.lang.String |
encodeHTML(java.lang.String text)
Utility function for encoding HTML entities in text. |
java.lang.String |
getCacheKey()
Returns the cache key for this problem |
static java.lang.String |
getCacheKey(int problemid)
Utility method to return the cache key given a problem id |
ProblemComponent |
getComponent(int i)
Gets the Problem Component at the given index |
java.lang.String |
getName()
Returns the problem name |
ProblemComponent |
getPrimaryComponent()
Returns the problem component considered the main component. |
ProblemComponent[] |
getProblemComponents()
Returns the components for this problem |
int |
getProblemId()
Returns the unique problem identifier |
java.lang.String |
getProblemText()
Returns the problem text |
int |
getProblemTypeID()
Returns the problem type identity |
ElementRenderer |
getRenderer()
Returns this elements renderer. |
WebService[] |
getWebServices()
Returns the web services for the problem |
boolean |
isValid()
Returns whether the problem is valid or not. |
void |
setName(java.lang.String name)
Sets the name of the problem |
void |
setProblemComponents(ProblemComponent[] problemComponents)
Sets the components for this problem |
void |
setProblemId(int problemId)
Sets the unique problem identifier |
void |
setProblemText(java.lang.String problemText)
Sets the problem text |
void |
setProblemTypeID(int problemTypeID)
Sets the problem type identity |
void |
setRenderer(ElementRenderer renderer)
Sets the renderer for this element. |
void |
setWebServices(WebService[] webServices)
Sets the web services for the problem |
java.lang.String |
toString()
Returns a user readable version of the problem |
java.lang.String |
toXML()
Returns an XML representation of the problem TODO: does anyone care this doesn't do anything? |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.topcoder.shared.problem.Element |
getRenderer, setRenderer |
| Constructor Detail |
public Problem()
| Method Detail |
public final java.lang.String getCacheKey()
public static java.lang.String getCacheKey(int problemid)
problemid - the unique problem identifier
public void customWriteObject(com.topcoder.shared.netCommon.CSWriter writer)
throws java.io.IOException
customWriteObject in interface Elementwriter - the writer to write to.
java.io.IOException - if an I/O error has occurred in the stream that backs the writer.
public void customReadObject(com.topcoder.shared.netCommon.CSReader reader)
throws java.io.IOException,
java.io.ObjectStreamException
customReadObject in interface Elementreader - the reader to read from.
java.io.ObjectStreamException - if the information that is read is inconsistent (stream corrupted
or incompatibility between writers and readers)
java.io.IOException - if an I/O error has occurred in the stream that backs the reader.public void setProblemId(int problemId)
problemId - the problem identifierpublic int getProblemId()
public java.lang.Object clone()
clone in class java.lang.Objectpublic void setName(java.lang.String name)
name - the name of the problempublic java.lang.String getName()
public java.lang.String getProblemText()
public void setProblemText(java.lang.String problemText)
problemText - the problem textpublic ProblemComponent[] getProblemComponents()
ProblemComponentpublic void setProblemComponents(ProblemComponent[] problemComponents)
problemComponents - the components for this problemProblemComponentpublic ProblemComponent getPrimaryComponent()
ProblemComponent,
ProblemConstantspublic int getProblemTypeID()
public void setProblemTypeID(int problemTypeID)
problemTypeID - the problem type identitypublic ProblemComponent getComponent(int i)
i - the index position
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isValid()
public void setWebServices(WebService[] webServices)
webServices - the web services for the problempublic WebService[] getWebServices()
public java.lang.String toXML()
toXML in interface Elementpublic void setRenderer(ElementRenderer renderer)
setRenderer in interface Elementrenderer - the element renderer.ElementRendererpublic ElementRenderer getRenderer()
getRenderer in interface ElementElementRendererpublic static java.lang.String encodeHTML(java.lang.String text)
text - the text to encode.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||