Package no.unit.nva.identifiers
Class SortableIdentifier
java.lang.Object
no.unit.nva.identifiers.SortableIdentifier
- All Implemented Interfaces:
Comparable<SortableIdentifier>
Generates ids of the form "0176f264a5ad-446893d8-3c02-4f64-936b-2997fec34e98". where the first part is an Instant
encoded in 12 hex digits (enough until the year 10889) and the rest is a UUID. The timestamp is should be used only
for sorting and not for identifying creation date
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintbooleanstatic SortableIdentifierinthashCode()static SortableIdentifiernext()toString()
-
Field Details
-
UUID_LENGTH
public static final int UUID_LENGTH- See Also:
-
TIMESTAMP_LENGTH
public static final int TIMESTAMP_LENGTH- See Also:
-
EXTRA_DASH
public static final int EXTRA_DASH- See Also:
-
SORTABLE_ID_LENGTH
public static final int SORTABLE_ID_LENGTH- See Also:
-
INVALID_SORTABLE_IDENTIFIER_ERROR
- See Also:
-
PATH_DELIMITER
- See Also:
-
INVALID_URI_ERROR_MESSAGE
- See Also:
-
-
Constructor Details
-
SortableIdentifier
-
-
Method Details
-
next
-
fromUri
-
hashCode
public int hashCode() -
equals
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<SortableIdentifier>
-