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).
- Alphabetic
- By Inheritance
- ULID
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
class
ULIDGenerator extends AnyRef
ULID generator.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val MaxValue: ULID
-
def
apply(ulidString: String): ULID
Create a new ULID from a given string of size 26
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
def
defaultULIDGenerator: ULIDGenerator
The default secure random-based ULID Generator
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fromBytes(bytes: Array[Byte], offset: Int): ULID
Create a ne ULID from a byte sequence (16-bytes)
-
def
fromBytes(bytes: Array[Byte]): ULID
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
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isValid(ulid: String): Boolean
check a given string is valid as ULID
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
newULID: ULID
Create a new ULID
-
def
newULIDString: String
Create a new ULID string
-
def
nonSecureRandomULIDGenerator: ULIDGenerator
Return a fast ULID generator, but with a reduced randomness
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
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
-
def
ofMillis(unixTimeMillis: Long): ULID
Create a new ULID from a given unix time in milli seconds
-
def
setDefaultULIDGenerator(newGenerator: ULIDGenerator): Unit
Set the default ULIDGenerator that will be used for ULID.newULID.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
- def unapply(ulidString: String): Option[ULID]
-
def
useDefaultULIDGenerator: Unit
Use the default secura-random based ULID generator.
-
def
useNonSecureRandomULIDGenerator: Unit
Use the fast ULID generator by default with reduced randomness
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated