Packages

object ULID

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).

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ULID
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class ULIDGenerator extends AnyRef

    ULID generator.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val MaxValue: ULID
  5. def apply(ulidString: String): ULID

    Create a new ULID from a given string of size 26

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  8. def defaultULIDGenerator: ULIDGenerator

    The default secure random-based ULID Generator

  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  11. def fromBytes(bytes: Array[Byte], offset: Int): ULID

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

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

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

  13. def fromString(ulid: String): ULID

    Create a new ULID from a given string of size 26

  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. def isValid(ulid: String): Boolean

    check a given string is valid as ULID

  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. def newULID: ULID

    Create a new ULID

  20. def newULIDString: String

    Create a new ULID string

  21. def nonSecureRandomULIDGenerator: ULIDGenerator

    Return a fast ULID generator, but with a reduced randomness

  22. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  24. 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)

    unixTimeMillis

    48-bit unix time millis

    randHi

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

    randLow

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

  25. def ofMillis(unixTimeMillis: Long): ULID

    Create a new ULID from a given unix time in milli seconds

  26. def setDefaultULIDGenerator(newGenerator: ULIDGenerator): Unit

    Set the default ULIDGenerator that will be used for ULID.newULID.

  27. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  28. def toString(): String
    Definition Classes
    AnyRef → Any
  29. def unapply(ulidString: String): Option[ULID]
  30. def useDefaultULIDGenerator: Unit

    Use the default secura-random based ULID generator.

  31. def useNonSecureRandomULIDGenerator: Unit

    Use the fast ULID generator by default with reduced randomness

  32. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  34. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped