Nanoflake

class Nanoflake

A Nanoflake.

Constructors

Nanoflake
Link copied to clipboard
common
fun Nanoflake(epoch: Long, value: Long)
Creates a new nanoflake.
Nanoflake
Link copied to clipboard
common
fun Nanoflake(epoch: Long, value: String)
Creates a new nanoflake, parsing the value from a string.
Nanoflake
Link copied to clipboard
common
fun Nanoflake(epoch: Long, value: String, radix: Int)
Creates a new nanoflake, parsing the value from a string with a radix.

Functions

asLong
Link copied to clipboard
common
fun asLong(): Long
Gets the nanoflake value as a Long.
asString
Link copied to clipboard
common
fun asString(): String
Gets the nanoflake value as a string.
creationTime
Link copied to clipboard
common
fun creationTime(): DateTime
Gets the creation time as an OffsetDateTime.
creationTimeMillis
Link copied to clipboard
common
fun creationTimeMillis(): Long
Gets the creation time.
epoch
Link copied to clipboard
common
fun epoch(): DateTime
Gets this nanoflake's epoch as an OffsetDateTime.
epochMillis
Link copied to clipboard
common
fun epochMillis(): Long
Gets this nanoflake's epoch.
equals
Link copied to clipboard
common
open operator override fun equals(other: Any?): Boolean
{@inheritDoc}
hashCode
Link copied to clipboard
common
open override fun hashCode(): Int
{@inheritDoc}
toString
Link copied to clipboard
common
open override fun toString(): String
{@inheritDoc}
withRadix
Link copied to clipboard
common
fun withRadix(radix: Int): String
Gets the nanoflake value as a string, using a specified radix.