Package org.javarosa.core.model.data
Class MultipleItemsData
java.lang.Object
org.javarosa.core.model.data.MultipleItemsData
- All Implemented Interfaces:
IAnswerData,Externalizable
- Direct Known Subclasses:
SelectMultiData
public class MultipleItemsData extends Object implements IAnswerData
A response to a question requesting a selection of
any number of items from a list or ordering them.
- Author:
- Drew Roos
-
Constructor Summary
Constructors Constructor Description MultipleItemsData()Empty Constructor, necessary for dynamic construction during deserialization.MultipleItemsData(List<Selection> vs) -
Method Summary
Modifier and Type Method Description MultipleItemsDatacast(UncastData data)Casts the provided data into this data type.IAnswerDataclone()StringgetDisplayText()ObjectgetValue()voidreadExternal(DataInputStream in, PrototypeFactory pf)voidsetValue(Object o)UncastDatauncast()Data types can be uncast if they are expected to be used in different contexts.voidwriteExternal(DataOutputStream out)
-
Constructor Details
-
MultipleItemsData
public MultipleItemsData()Empty Constructor, necessary for dynamic construction during deserialization. Shouldn't be used otherwise. -
MultipleItemsData
-
-
Method Details
-
clone
- Specified by:
clonein interfaceIAnswerData- Overrides:
clonein classObject
-
setValue
- Specified by:
setValuein interfaceIAnswerData- Parameters:
o- the value of this answerdata object. Cannot be null. Null Data will not overwrite existing values.
-
getValue
- Specified by:
getValuein interfaceIAnswerData- Returns:
- The value of this answer, will never be null
-
getDisplayText
- Specified by:
getDisplayTextin interfaceIAnswerData- Returns:
- THE XMLVALUE!!
-
readExternal
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionDeserializationException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
uncast
Description copied from interface:IAnswerDataData types can be uncast if they are expected to be used in different contexts. This allows, for instance, select values to be generated by casting other types or vic-a-versa.- Specified by:
uncastin interfaceIAnswerData- Returns:
- An uncast representation of this answer which can be used in a different context.
-
cast
Description copied from interface:IAnswerDataCasts the provided data into this data type.- Specified by:
castin interfaceIAnswerData- Parameters:
data- An uncast data value which is compatible with this data type- Returns:
- An instance of the instance's data type which contains that value
- Throws:
IllegalArgumentException- If the uncast data is not in a compatible format
-