DittoRegister

open class DittoRegister(value: Any?)

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

Constructors

Link copied to clipboard
fun DittoRegister(value: Any?)

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

Properties

Link copied to clipboard
val booleanValue: Boolean

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

Link copied to clipboard
val double: Double?

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

Link copied to clipboard
val doubleValue: Double

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
val floatValue: Float

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
val intValue: Int

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
val listValue: List<Any?>

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
val mapValue: Map<String, Any?>

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

Link copied to clipboard
val string: String?

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

Link copied to clipboard
val stringValue: String

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.

Inheritors

Link copied to clipboard