Reusable Java library of general tools with minimal external dependencies.
For questions or support, please contact us:
Email: support@aoindustries.com
Phone: 1-800-519-9541
Phone: +1-251-607-9556
Web: https://www.aoindustries.com/contact
public class Identifier extends Object implements Serializable, Comparable<Identifier>
| Constructor and Description |
|---|
Identifier()
Creates a new, random Identifier using the default SecureRandom instance.
|
Identifier(long hi,
long lo) |
Identifier(Random random)
Creates a new, random Identifier using the provided Random source.
|
Identifier(String encoded) |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Identifier other)
Unsigned ordering.
|
boolean |
equals(Identifier other) |
boolean |
equals(Object O) |
long |
getHi() |
long |
getLo() |
int |
hashCode() |
static void |
main(String[] args) |
String |
toString()
The external representation is a string of characters encoded in base 57, with
the first 11 characters for "hi" and the last 11 characters for "lo".
|
static Identifier |
valueOf(String encoded) |
public Identifier()
public Identifier(Random random)
public Identifier(long hi,
long lo)
public Identifier(String encoded) throws IllegalArgumentException
IllegalArgumentExceptiontoString()public static Identifier valueOf(String encoded) throws IllegalArgumentException
IllegalArgumentExceptiontoString()public boolean equals(Identifier other)
public String toString()
public int compareTo(Identifier other)
compareTo in interface Comparable<Identifier>public long getHi()
public long getLo()
public static void main(String[] args)
Copyright © 2000–2016 AO Industries, Inc.. All rights reserved.