Value

public data final class Value


A Parcelable wrapper that can hold a value of a specified type.

Summary

Nested types

Value.Companion

Public fields

final @NonNull List<@NonNull Double>
final int
final boolean

Whether or not this Value can be represented as an boolean.

final boolean

Whether or not this Value can be represented as a double.

final boolean

Whether or not this Value can be represented as a double[].

final boolean

Whether or not this Value can be represented as an long.

final long

Public methods

final boolean

Returns this Value represented as an boolean.

final double

Returns this Value represented as a double.

final @NonNull double[]

Returns this Value represented as a double[].

final long

Returns this Value represented as an long.

int
void
writeToParcel(@NonNull Parcel dest, int flags)

Writes the value of this object to dest.

Public fields

doubleList

@NonNull
public final @NonNull List<@NonNull DoubledoubleList

format

@NonNull
public final int format

isBoolean

@NonNull
public final boolean isBoolean

Whether or not this Value can be represented as an boolean.

isDouble

@NonNull
public final boolean isDouble

Whether or not this Value can be represented as a double.

isDoubleArray

@NonNull
public final boolean isDoubleArray

Whether or not this Value can be represented as a double[].

isLong

@NonNull
public final boolean isLong

Whether or not this Value can be represented as an long.

longValue

@NonNull
public final long longValue

Public methods

asBoolean

@NonNull
public final boolean asBoolean()

Returns this Value represented as an boolean.

Throws
kotlin.IllegalStateException

if isBoolean is false

asDouble

@NonNull
public final double asDouble()

Returns this Value represented as a double.

Throws
kotlin.IllegalStateException

if isDouble is false

asDoubleArray

@NonNull
public final double[] asDoubleArray()

Returns this Value represented as a double[].

Throws
kotlin.IllegalStateException

if isDoubleArray is false

asLong

@NonNull
public final long asLong()

Returns this Value represented as an long.

Throws
kotlin.IllegalStateException

if isLong is false

describeContents

@NonNull
public int describeContents()

writeToParcel

@NonNull
public void writeToParcel(@NonNull Parcel dest, int flags)

Writes the value of this object to dest.

Throws
kotlin.IllegalStateException

if format is invalid