MetadataValue

public class MetadataValue implements Serializable

Represents a value for a metadata entry in a Commcare form. Can have multiple string values.

Constructors

MetadataValue

public MetadataValue(String value)

Creates this object from a single value.

Parameters:
  • value – the metadata value

MetadataValue

public MetadataValue(Collection<String> values)

Creates this object from a collection of values.

Parameters:
  • values – the metadata values

Methods

firstValue

public String firstValue()

Returns the first value from the metadata. Can be used to easily retrieve the value if we know that this entry has only a single value.

Returns:the first value, or null if there are no values

getValues

public Collection<String> getValues()
Returns:the values collection

setValues

public void setValues(Collection<String> values)
Parameters:
  • values – the values collection