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)BooleangetBooleanValue()Retrieves the value of the field as a Boolean.DoublegetDoubleValue()Retrieves the value of the field as a Double.StringgetStringValue()Retrieves the value of the field as a string.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 a string.- 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 a Double.- Returns:
- the field value as a Double
- Throws:
ClassCastException- if the value cannot be cast to a Double
-
getBooleanValue
public Boolean getBooleanValue() throws ClassCastException
Retrieves the value of the field as a Boolean.- 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).
-
-