java.lang.Object
de.s42.base.uuid.UUID58
UUID58 provides uuid base58 string encoding and decoding for UUIDs to shorten, improve readability and cUngültige Eingabe: "&p" support in
string form.
uuid58 strings look like: hxAGoWGvFPR35qxCG5fYuX, ouyeFFWJLjnNeJfjs9DcvY, cyAp8zexLqUQRGFxRVcBCF, ...
- Autor:
- Benjamin Schiller
-
Feldübersicht
Modifizierer und TypFeldBeschreibungstatic final BigInteger
The radix 58 as BigIntegerstatic final String
This is the symbols used for the encodet string to improve readability avoiding similar chars like 0 and O or 1 and Istatic final char[]
static final Pattern
This pattern allows you to validate a uuid58 string pattern -
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungstatic UUID
fromString
(String uuid58) Converts a uuid base58 string into a UUID.static boolean
isUUID58Like
(String string) Checks if the given string could be a valid uuid58 string.static String
Converts a UUID into a uuid base58 string.
-
Felddetails
-
SYMBOLS
This is the symbols used for the encodet string to improve readability avoiding similar chars like 0 and O or 1 and I- Siehe auch:
-
SYMBOLS_CHARS
public static final char[] SYMBOLS_CHARS -
UUID58_PATTERN
This pattern allows you to validate a uuid58 string pattern -
RADIX
The radix 58 as BigInteger
-
-
Konstruktordetails
-
UUID58
private UUID58()
-
-
Methodendetails
-
isUUID58Like
Checks if the given string could be a valid uuid58 string.- Parameter:
string
-- Gibt zurück:
-
fromString
public static UUID fromString(String uuid58) throws IndexOutOfBoundsException, IllegalArgumentException, NullPointerException Converts a uuid base58 string into a UUID. ATTENTION: A uuid base58 string is often 22 signs, BUT can be as short as 18 chars if the uuid (i.e. v4) has many leading 0-- Parameter:
uuid58
- A valid uuid base58 string- Gibt zurück:
- Restored UUID from uuid58 string
- Löst aus:
IllegalArgumentException
- If the string is too longIndexOutOfBoundsException
- If a character is contained which is not part of the SymbolsNullPointerException
- If the parameter uuid58 is null
-
toString
Converts a UUID into a uuid base58 string.- Parameter:
uuid
- The UUID to be converted- Gibt zurück:
- The uuid base58 string
- Löst aus:
NullPointerException
- If the parameter uuid58 is null
-