public class IdUtils extends Object
| Constructor and Description |
|---|
IdUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
randomId()
Generate a short random id (see
StringHelper.randomId()). |
static String |
timeRandomId()
Generate a random id with a timestamp, in the format:
hex(timestamp) + 'T' + randomId. |
static String |
timeRandomId(long time)
Generate a random id with a timestamp, in the format:
hex(timestamp) + 'T' + randomId. |
public static final String randomId()
StringHelper.randomId()).public static final String timeRandomId()
hex(timestamp) + 'T' + randomId. This method
uses TimeSource.CURRENT_TIME for timestamp values.public static final String timeRandomId(long time)
hex(timestamp) + 'T' + randomId.time - value representing timestampCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.