|
||||||||||
| 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.Range
A class to represent a range of values. The range can represent a numeric range or a range of characters. Both are stored as string representations.
| Constructor Summary | |
Range()
Empty constructor required by custom serialization. |
|
Range(java.lang.String min,
java.lang.String max)
Constructs the range (TODO shouldn't these be ints?). |
|
| Method Summary | |
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 |
getMax()
Returns the max of the range. |
java.lang.String |
getMin()
Returns the min of the range. |
ElementRenderer |
getRenderer()
Returns this elements renderer. |
void |
setRenderer(ElementRenderer renderer)
Sets the renderer for this element. |
java.lang.String |
toXML()
Returns the XML representation of the object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.topcoder.shared.problem.Element |
getRenderer, setRenderer |
| Constructor Detail |
public Range(java.lang.String min,
java.lang.String max)
min - the minumum value of the range.max - the maximum value of the range.public Range()
| Method Detail |
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 java.lang.String getMin()
public java.lang.String getMax()
public java.lang.String toXML()
<range min='min value' max='max value'></range>"
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 | |||||||||