|
||||||||||
| 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.DataValue
|
+--com.topcoder.shared.problem.CharacterValue
Implementation of DataValue that holds a single character value. Essentially a wrapper around the java 'char' and can hold any valid character (including unicode).
| Constructor Summary | |
CharacterValue()
Empty constructor required by custom serialization. |
|
CharacterValue(char value)
Constructs the character value from the specified character. |
|
| Method Summary | |
void |
customReadObject(com.topcoder.shared.netCommon.CSReader reader)
Custom serialization. |
void |
customWriteObject(com.topcoder.shared.netCommon.CSWriter writer)
Custom serialization. |
java.lang.String |
encode()
Encode the character into a user readable string (ie adds quotes around the character and will escape back-slashes and quotes). |
char |
getChar()
Gets the character value |
java.lang.Object |
getValue()
Gets the character as an Object |
void |
parse(DataValueReader reader,
DataType type)
Parses the information in the DataValueReader for a character. |
| Methods inherited from class com.topcoder.shared.problem.DataValue |
convertDataValuesToObjects, convertDataValueToObject, convertObjectsToDataValues, convertObjectToDataValue, encodeHTML, getRenderer, parseSequence, parseSequence, parseValue, parseValue, parseValues, parseValuesToObjects, parseValueToObject, setRenderer, toXML |
| 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 CharacterValue()
public CharacterValue(char value)
value - the value to construct from.| Method Detail |
public void parse(DataValueReader reader,
DataType type)
throws java.io.IOException,
DataValueParseException
parse in class DataValuereader - the reader of the unparsed data.type - unused.
DataValueParseException - if a parsing exception occurs.
java.io.IOException - if an exception occurred during reading.DataType,
DataValueReader
public void customWriteObject(com.topcoder.shared.netCommon.CSWriter writer)
throws java.io.IOException
writer - 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
reader - 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 encode()
encode in class DataValuepublic char getChar()
public java.lang.Object getValue()
getValue in class DataValue
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||