Freigeben über


ContentIntegerField Class

public final class ContentIntegerField
extends ContentField

Integer field extracted from the content.

Method Summary

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

Reads an instance of ContentIntegerField from the JsonReader.

ContentFieldType getType()

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

Long 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 ContentIntegerField fromJson(JsonReader jsonReader)

Reads an instance of ContentIntegerField from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ContentIntegerField 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 ContentIntegerField.

getType

public ContentFieldType getType()

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

Overrides:

ContentIntegerField.getType()

Returns:

the type value.

getValue

public Long getValue()

Gets the strongly-typed value of this field.

Overrides:

ContentIntegerField.getValue()

Returns:

the field value, or null if not available.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

ContentIntegerField.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to