public class StringData extends java.lang.Object implements IAnswerData
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
s |
Constructor and Description |
---|
StringData()
Empty Constructor, necessary for dynamic construction during deserialization.
|
StringData(java.lang.String s) |
Modifier and Type | Method and Description |
---|---|
StringData |
cast(UncastData data)
Casts the provided data into this data type.
|
IAnswerData |
clone() |
java.lang.String |
getDisplayText() |
java.lang.Object |
getValue() |
void |
readExternal(java.io.DataInputStream in,
PrototypeFactory pf) |
void |
setValue(java.lang.Object o) |
UncastData |
uncast()
Data types can be uncast if they are expected to be used
in different contexts.
|
void |
writeExternal(java.io.DataOutputStream out) |
public StringData()
public StringData(java.lang.String s)
public IAnswerData clone()
clone
in interface IAnswerData
clone
in class java.lang.Object
public void setValue(java.lang.Object o)
setValue
in interface IAnswerData
o
- the value of this answerdata object. Cannot be null.
Null Data will not overwrite existing values.public java.lang.Object getValue()
getValue
in interface IAnswerData
public java.lang.String getDisplayText()
getDisplayText
in interface IAnswerData
public void readExternal(java.io.DataInputStream in, PrototypeFactory pf) throws java.io.IOException, DeserializationException
readExternal
in interface Externalizable
java.io.IOException
DeserializationException
public void writeExternal(java.io.DataOutputStream out) throws java.io.IOException
writeExternal
in interface Externalizable
java.io.IOException
public UncastData uncast()
IAnswerData
uncast
in interface IAnswerData
public StringData cast(UncastData data) throws java.lang.IllegalArgumentException
IAnswerData
cast
in interface IAnswerData
data
- An uncast data value which is compatible
with this data typejava.lang.IllegalArgumentException
- If the uncast data is
not in a compatible format