DittoRegister

open class DittoRegister(value: Any?)

Container for a number. See DittoMutableCounter which can be incremented and decremented.

Inheritors

Constructors

Link copied to clipboard
constructor(value: Any?)

Properties

Link copied to clipboard

Returns the register's value as a Boolean if possible, otherwise returns null.

Link copied to clipboard

Returns the register's value as a Double if possible, otherwise returns null.

Link copied to clipboard

Returns the register's value as a Double if possible, otherwise returns 0.0.

Link copied to clipboard
val float: Float?

Returns the register's value as a Float if possible, otherwise returns null.

Link copied to clipboard

Returns the register's value as a Float if possible, otherwise returns 0.0f.

Link copied to clipboard
val int: Int?

Returns the register's value as a Int if possible, otherwise returns null.

Link copied to clipboard

Returns the register's value as a Int if possible, otherwise returns 0.

Link copied to clipboard
val list: List<Any?>?

Returns the register's value as a List<Any?> if possible, otherwise returns null.

Link copied to clipboard

Returns the register's value as a List<Any?> if possible, otherwise an empty List.

Link copied to clipboard
val map: Map<String, Any?>?

Returns the register's value as a Map<String, Any?> if possible, otherwise returns null.

Link copied to clipboard

Returns the register's value Map<String, Any?> if possible, otherwise an empty Map.

Link copied to clipboard

Returns the register's value as a String if possible, otherwise returns null.

Link copied to clipboard

Returns the register's value as a String if possible, otherwise returns an empty String.

Link copied to clipboard
open var value: Any?

Current value of the DittoRegister.

Functions

Link copied to clipboard
fun cbor(): Map<String, Any?>

Builds a Map representation of the DittoRegister ready to be translated to CBOR.

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int