public final class FieldValue extends Object
| Constructor and Description |
|---|
FieldValue(Object value,
FieldValueType valueType)
Constructs a FieldValue object
|
| Modifier and Type | Method and Description |
|---|---|
String |
asCountryRegion()
Gets the value of the field as a country or region in the world.
|
LocalDate |
asDate()
Gets the value of the field as a
LocalDate. |
Float |
asFloat()
Gets the value of the field as a
Float. |
List<FormField> |
asList()
Gets the value of the field as a
List. |
Long |
asLong()
Gets the value of the field as a
Long. |
Map<String,FormField> |
asMap()
Gets the value of the field as a
Map. |
String |
asPhoneNumber()
Gets the value of the field as a phone number.
|
SelectionMarkState |
asSelectionMarkState()
Gets the value of the field as a selection mark state.
|
String |
asString()
Gets the value of the field as a
String. |
LocalTime |
asTime()
Gets the value of the field as a
LocalTime. |
FieldValueType |
getValueType()
Gets the type of the value of the field.
|
public FieldValue(Object value, FieldValueType valueType)
value - The actual value of the field.valueType - The type of the field.public FieldValueType getValueType()
type of the field.public String asString()
String.String.UnsupportedOperationException - if FieldValue.getValueType() is not FieldValueType.STRING.public Long asLong()
Long.Long.UnsupportedOperationException - if FieldValue.getValueType() is not FieldValueType.LONG.public Float asFloat()
Float.Float.UnsupportedOperationException - if FieldValue.getValueType() is not FieldValueType.FLOAT.public LocalDate asDate()
LocalDate.LocalDate.UnsupportedOperationException - if FieldValue.getValueType() is not FieldValueType.DATE.public LocalTime asTime()
LocalTime.LocalTime.UnsupportedOperationException - if FieldValue.getValueType() is not FieldValueType.TIME.public String asPhoneNumber()
UnsupportedOperationException - if FieldValue.getValueType() is not
FieldValueType.PHONE_NUMBER.public List<FormField> asList()
List.List.UnsupportedOperationException - if FieldValue.getValueType() is not FieldValueType.LIST.public Map<String,FormField> asMap()
Map.Map.UnsupportedOperationException - if FieldValue.getValueType() is not FieldValueType.MAP.public SelectionMarkState asSelectionMarkState()
UnsupportedOperationException - if FieldValue.getValueType() is not
FieldValueType.SELECTION_MARK_STATE.public String asCountryRegion()
UnsupportedOperationException - if FieldValue.getValueType() is not
FieldValueType.COUNTRY_REGION.Copyright © 2021 Microsoft Corporation. All rights reserved.