Package com.mindee.parsing.v2.field
Class SimpleField
- java.lang.Object
-
- com.mindee.parsing.v2.field.BaseField
-
- com.mindee.parsing.v2.field.SimpleField
-
public final class SimpleField extends BaseField
Field holding a single scalar value.
-
-
Constructor Summary
Constructors Constructor Description SimpleField(Object value, FieldConfidence confidence, List<FieldLocation> locations)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)BigDecimalgetBigDecimalValue()Retrieves the value of the field as aBigDecimal.BooleangetBooleanValue()Retrieves the value of the field as aBoolean.DoublegetDoubleValue()Retrieves the value of the field as aDouble.StringgetStringValue()Retrieves the value of the field as aString.ObjectgetValue()Value (string, boolean, double, ornull).inthashCode()StringtoString()-
Methods inherited from class com.mindee.parsing.v2.field.BaseField
getConfidence, getLocations, setConfidence, setLocations
-
-
-
-
Constructor Detail
-
SimpleField
public SimpleField(Object value, FieldConfidence confidence, List<FieldLocation> locations)
-
-
Method Detail
-
getStringValue
public String getStringValue() throws ClassCastException
Retrieves the value of the field as aString.- Returns:
- the field value as a string
- Throws:
ClassCastException- if the value cannot be cast to a string
-
getDoubleValue
public Double getDoubleValue() throws ClassCastException
Retrieves the value of the field as aDouble.- Returns:
- the field value as a Double
- Throws:
ClassCastException- if the value cannot be cast to a Double
-
getBigDecimalValue
public BigDecimal getBigDecimalValue() throws ClassCastException
Retrieves the value of the field as aBigDecimal.- Returns:
- the field value as a BigDecimal
- Throws:
ClassCastException- if the value cannot be cast to a BigDecimal
-
getBooleanValue
public Boolean getBooleanValue() throws ClassCastException
Retrieves the value of the field as aBoolean.- Returns:
- the field value as a Boolean
- Throws:
ClassCastException- if the value cannot be cast to a Boolean
-
getValue
public Object getValue()
Value (string, boolean, double, ornull).
-
-