Unique
Unique String generator
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Unique.type
Members list
Value members
Concrete methods
Generates a unique String using the characters supplied at the length defined.
Generates a unique String using the characters supplied at the length defined.
Value parameters
- characters
-
the characters for use in the String. Defaults to Unique.defaultCharacters.
- length
-
the length of the resulting String. Defaults to Unique.defaultLength.
- secure
-
true if the randomization should be secure. Defaults to Unique.defaultSecure.
Attributes
- Returns
-
a unique String
Returns the number of possible values for a specific length and characters.
Returns the number of possible values for a specific length and characters.
Attributes
Uses java.util.concurrent.ThreadLocalRandom to generate random numbers.
Uses java.util.concurrent.ThreadLocalRandom to generate random numbers.
Value parameters
- max
-
the maximum value to include
Attributes
- Returns
-
random number between 0 and max
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
Attributes
Concrete fields
The default characters to use for generating unique values. Defaults to AllLettersAndNumbers.
The default characters to use for generating unique values. Defaults to AllLettersAndNumbers.
Attributes
The default length to use for generating unique values. Defaults to 32.
The default length to use for generating unique values. Defaults to 32.
Attributes
True if randomization should be secure. Defaults to false.
True if randomization should be secure. Defaults to false.
Attributes
Random number generator used to generate unique values. Defaults to threadLocalRandom
.
Random number generator used to generate unique values. Defaults to threadLocalRandom
.