E
- public class MultipleChoiceDataElt<E extends Choice> extends SimpleDataElt
Constructor and Description |
---|
MultipleChoiceDataElt(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addChoice(E choice) |
void |
addChoice(java.lang.String choice) |
void |
addChoices(E[] choices) |
void |
addChoices(java.lang.String[] choices) |
void |
addPayload(MessageReader reader)
for each element, should read and add content for all elements between the
"TYP" field (excluded) and the "DELT" structure end (also excluded)
|
SimpleDataElt |
cloneElt()
makes a deep copy of the element
|
java.lang.String |
defaultTextRepresentation() |
void |
forceContent(java.lang.String constraintvalue) |
protected java.lang.Object |
getMessageArrayValue() |
protected MessageFieldSpec |
getMessageFieldSpec() |
java.lang.String |
getSelectedChoiceAt(int index) |
int |
getSelectedChoicesNumber() |
void |
writePayload(MessageWriter writer)
writes the payload for network transport
|
getEltCreator, getPropertyname, setPropertyname, toString, WriteSpecToMessage, writeToMessage, writeToMessage
getType, readFromCML, writeReferenceToCML
changeName, cleanName, equals, getName
public void addChoice(E choice)
public void addChoices(E[] choices)
public void addChoice(java.lang.String choice)
public void addChoices(java.lang.String[] choices)
public int getSelectedChoicesNumber()
public java.lang.String getSelectedChoiceAt(int index)
public SimpleDataElt cloneElt()
SimpleDataElt
cloneElt
in class SimpleDataElt
public void writePayload(MessageWriter writer) throws java.io.IOException
SimpleDataElt
writePayload
in class SimpleDataElt
writer
- writerjava.io.IOException
- if anything wrongs happens in the message sendingpublic java.lang.String defaultTextRepresentation()
defaultTextRepresentation
in class SimpleDataElt
public void forceContent(java.lang.String constraintvalue)
forceContent
in class SimpleDataElt
constraintvalue
- force the content in payload. May not be implemented
for all the typesprotected MessageFieldSpec getMessageFieldSpec()
getMessageFieldSpec
in class SimpleDataElt
protected java.lang.Object getMessageArrayValue()
getMessageArrayValue
in class SimpleDataElt
public void addPayload(MessageReader reader) throws OLcRemoteException, java.io.IOException
DataElt
addPayload
in class SimpleDataElt
reader
- readerOLcRemoteException
- if anything happened to the other partyjava.io.IOException
- if any communication error happens