public final class UnixEpochFormatSpecifier extends FormatSpecifier
utc-millisec format specification
As an extra step, this validator also ensures that the number in the
instance is not negative, and does not overflow: Java's System.currentTimeMillis() may return a long, but internally the return
code is a signed 32-bit integer, therefore must not be greater than 2^31 -
1.
| Modifier and Type | Field and Description |
|---|---|
private static int |
EPOCH_BITLENGTH
The maximum bit length of a Unix timestamp value
|
private static FormatSpecifier |
instance |
private static BigInteger |
ONE_THOUSAND
1000 as a
BigInteger |
| Modifier | Constructor and Description |
|---|---|
private |
UnixEpochFormatSpecifier() |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
checkValue(List<String> messages,
JsonNode value)
Abstract method implemented by all specifiers
|
static FormatSpecifier |
getInstance() |
validateprivate static final FormatSpecifier instance
private static final int EPOCH_BITLENGTH
private static final BigInteger ONE_THOUSAND
BigIntegerpublic static FormatSpecifier getInstance()
void checkValue(List<String> messages, JsonNode value)
FormatSpecifierIt is only called if the value type is one expected by the
specifier, see FormatSpecifier.validate(List, JsonNode).
checkValue in class FormatSpecifiermessages - the list of messages to fillvalue - the value to validateCopyright © 2012. All Rights Reserved.