object Unique
Unique String generator
- Alphabetic
- By Inheritance
- Unique
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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
- lazy val AllLettersAndNumbers: String
- lazy val Hexadecimal: String
- lazy val LettersAndNumbers: String
- lazy val LettersLower: String
- lazy val LettersUpper: String
- lazy val Numbers: String
- lazy val Readable: String
- def apply(length: Int = defaultLength, characters: String = defaultCharacters, secure: Boolean = defaultSecure): String
Generates a unique String using the characters supplied at the length defined.
Generates a unique String using the characters supplied at the length defined.
- length
the length of the resulting String. Defaults to Unique.defaultLength.
- characters
the characters for use in the String. Defaults to Unique.defaultCharacters.
- secure
true if the randomization should be secure. Defaults to Unique.defaultSecure.
- returns
a unique String
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- var defaultCharacters: String
The default characters to use for generating unique values.
The default characters to use for generating unique values. Defaults to AllLettersAndNumbers.
- var defaultLength: Int
The default length to use for generating unique values.
The default length to use for generating unique values. Defaults to 32.
- var defaultSecure: Boolean
True if randomization should be secure.
True if randomization should be secure. Defaults to false.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def poolSize(length: Int = 32, characters: String = AllLettersAndNumbers): Long
Returns the number of possible values for a specific length and characters.
- var random: (Int) => Int
Random number generator used to generate unique values.
Random number generator used to generate unique values. Defaults to
threadLocalRandom
. - final def secureRandom(max: Int): Int
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def threadLocalRandom(max: Int): Int
Uses java.util.concurrent.ThreadLocalRandom to generate random numbers.
Uses java.util.concurrent.ThreadLocalRandom to generate random numbers.
- max
the maximum value to include
- returns
random number between 0 and max
- def toString(): String
- Definition Classes
- AnyRef → Any
- def uuid(secure: Boolean = false): String
Convenience functionality to generate a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier)
Convenience functionality to generate a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier)
32 characters of unique hexadecimal values with dashes representing 36 total characters
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)