public abstract class Identifier extends Object implements net.minidev.json.JSONAware
Extending classes must override the equals(java.lang.Object) method.
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BYTE_LENGTH
The default byte length of generated identifiers.
|
| Constructor and Description |
|---|
Identifier()
Creates a new identifier with a randomly generated 256-bit
(32-byte) value, Base64URL-encoded.
|
Identifier(int byteLength)
Creates a new identifier with a randomly generated value of the
specified byte length, Base64URL-encoded.
|
Identifier(String value)
Creates a new identifier with the specified value.
|
| Modifier and Type | Method and Description |
|---|---|
abstract boolean |
equals(Object object)
Overrides
Object.equals(). |
String |
getValue()
Returns the value of this identifier.
|
int |
hashCode()
Overrides
Object.hashCode(). |
String |
toJSONString()
Returns the JSON string representation of this identifier.
|
String |
toString() |
public static final int DEFAULT_BYTE_LENGTH
public Identifier(String value)
value - The identifier value. Must not be null or empty
string.public Identifier(int byteLength)
byteLength - The byte length of the value to generate. Must be
greater than one.public Identifier()
public String toJSONString()
toJSONString in interface net.minidev.json.JSONAwarepublic String toString()
toString in class ObjectgetValue()public int hashCode()
Object.hashCode().Copyright © 2013 NimbusDS. All Rights Reserved.