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
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기