ULID

object ULID

ULID generator implementation based on https://github.com/petitviolet/ulid4s

ULID generator implementation based on https://github.com/petitviolet/ulid4s

ULID has 128 bit value: |-- Unix timestamp milliseconds (48-bit) ---- | ----- random value (80 bits) ------ |

The string representation of ULID uses 26 characters in Crockford Base 32 representation, each character of which represents 5-bit value (0-31).

Companion
class
trait Product
trait Mirror
class Object
trait Matchable
class Any

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

Value members

Concrete methods

def apply(ulidString: String): ULID

Create a new ULID from a given string of size 26

Create a new ULID from a given string of size 26

def fromBytes(bytes: Array[Byte]): ULID

Create a ne ULID from a byte sequence (16-bytes)

Create a ne ULID from a byte sequence (16-bytes)

def fromBytes(bytes: Array[Byte], offset: Int): ULID

Create a ne ULID from a byte sequence (16-bytes)

Create a ne ULID from a byte sequence (16-bytes)

def fromString(ulid: String): ULID

Create a new ULID from a given string of size 26

Create a new ULID from a given string of size 26

def isValid(ulid: String): Boolean

check a given string is valid as ULID

check a given string is valid as ULID

Create a new ULID

Create a new ULID

def newULIDString: String

Create a new ULID string

Create a new ULID string

def of(unixTimeMillis: Long, randHi: Long, randLow: Long): ULID

Create an ULID from a given timestamp (48-bit) and a random value (80-bit)

Create an ULID from a given timestamp (48-bit) and a random value (80-bit)

Value Params
randHi

16-bit hi-part of 80-bit random value

randLow

64-bit low-part of 80-bit random value

unixTimeMillis

48-bit unix time millis

def unapply(ulidString: String): Option[ULID]

Concrete fields