Share via


ContentNumberField Class

public final class ContentNumberField
extends ContentField

Number field extracted from the content.

Method Summary

Modifier and Type Method and Description
static ContentNumberField fromJson(JsonReader jsonReader)

Reads an instance of ContentNumberField from the JsonReader.

ContentFieldType getType()

Get the type property: Semantic data type of the field value.

Double getValue()

Gets the strongly-typed value of this field.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from ContentField

Methods inherited from java.lang.Object

Method Details

fromJson

public static ContentNumberField fromJson(JsonReader jsonReader)

Reads an instance of ContentNumberField from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ContentNumberField if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the ContentNumberField.

getType

public ContentFieldType getType()

Get the type property: Semantic data type of the field value.

Overrides:

ContentNumberField.getType()

Returns:

the type value.

getValue

public Double getValue()

Gets the strongly-typed value of this field.

Overrides:

ContentNumberField.getValue()

Returns:

the field value, or null if not available.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

ContentNumberField.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to