Share via


ContentBooleanField Class

public final class ContentBooleanField
extends ContentField

Boolean field extracted from the content.

Method Summary

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

Reads an instance of ContentBooleanField from the JsonReader.

ContentFieldType getType()

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

Boolean 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 ContentBooleanField fromJson(JsonReader jsonReader)

Reads an instance of ContentBooleanField from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

getType

public ContentFieldType getType()

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

Overrides:

ContentBooleanField.getType()

Returns:

the type value.

getValue

public Boolean getValue()

Gets the strongly-typed value of this field.

Overrides:

ContentBooleanField.getValue()

Returns:

the field value, or null if not available.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Overrides:

ContentBooleanField.toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to