Record Class IdShortHumanToken
java.lang.Object
java.lang.Record
com.io7m.idstore.model.IdShortHumanToken
- Record Components:
value- The token string
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static IdShortHumanTokengenerate()Generate a random token, using a default strong RNG instance.static IdShortHumanTokengenerate(SecureRandom random) Generate a random token.final inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Field Details
-
VALID_NUMBER
The pattern that defines a valid token.
-
-
Constructor Details
-
IdShortHumanToken
-
-
Method Details
-
generate
Generate a random token.- Parameters:
random- The secure random instance- Returns:
- A random token
-
generate
Generate a random token, using a default strong RNG instance.- Returns:
- A random token
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
value
-