FieldValue Class
- java.
lang. Object - com.
azure. ai. formrecognizer. models. FieldValue
- com.
public final class FieldValue
Represents the strongly-typed value of a field recognized from the input document and provides methods for converting it to the appropriate type.
Constructor Summary
Constructor | Description |
---|---|
FieldValue(Object value, FieldValueType valueType) |
Constructs a Field |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
asCountryRegion()
Gets the value of the field as a country or region in the world. |
Local |
asDate()
Gets the value of the field as a LocalDate. |
Float |
asFloat()
Gets the value of the field as a Float. |
List<Form |
asList()
Gets the value of the field as a List. |
Long |
asLong()
Gets the value of the field as a Long. |
Map<String,Form |
asMap()
Gets the value of the field as a Map. |
String |
asPhoneNumber()
Gets the value of the field as a phone number. |
Selection |
asSelectionMarkState()
Gets the value of the field as a selection mark state. |
String |
asString()
Gets the value of the field as a String. |
Local |
asTime()
Gets the value of the field as a LocalTime. |
Field |
getValueType()
Gets the type of the value of the field. |
Methods inherited from java.lang.Object
Constructor Details
FieldValue
public FieldValue(Object value, FieldValueType valueType)
Constructs a FieldValue object
Parameters:
Method Details
asCountryRegion
public String asCountryRegion()
Gets the value of the field as a country or region in the world.
Returns:
asDate
public LocalDate asDate()
Gets the value of the field as a LocalDate.
Returns:
asFloat
public Float asFloat()
Gets the value of the field as a Float.
Returns:
asList
public List
Gets the value of the field as a List.
Returns:
asLong
public Long asLong()
Gets the value of the field as a Long.
Returns:
asMap
public Map
Gets the value of the field as a Map.
Returns:
asPhoneNumber
public String asPhoneNumber()
Gets the value of the field as a phone number.
Returns:
asSelectionMarkState
public SelectionMarkState asSelectionMarkState()
Gets the value of the field as a selection mark state.
Returns:
asString
public String asString()
Gets the value of the field as a String.
Returns:
asTime
public LocalTime asTime()
Gets the value of the field as a LocalTime.
Returns:
getValueType
public FieldValueType getValueType()
Gets the type of the value of the field.
Returns:
Applies to
Azure SDK for Java