public enum TimestampFormat extends Enum<TimestampFormat>
Enum Constant and Description |
---|
YYYYMMDD
Indicates timestamp in "YYYYMMDD" format.
|
YYYYMMDDHHMMSS
Indicates timestamp in "YYYYMMDD-HH:MM:SS" format.
|
YYYYMMDDHHMMSSMsec
Indicates timestamp in "YYYYMMDD-HH:MM:SS.sss" format.
|
YYYYMMDDHHMMSSNsec
Indicates timestamp in "YYYYMMDD-HH:MM:SS.sssssssss" format.
|
YYYYMMDDHHMMSSPsec
Indicates timestamp in "YYYYMMDD-HH:MM:SS.ssssssssssss" format.
|
YYYYMMDDHHMMSSUsec
Indicates timestamp in "YYYYMMDD-HH:MM:SS.ssssss" format.
|
Modifier and Type | Method and Description |
---|---|
static TimestampFormat |
getByLengthOrNull(int length)
Retrieves the timestamp format based on its length.
|
int |
getLength()
Returns the length of the timestamp format.
|
static TimestampFormat |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TimestampFormat[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TimestampFormat YYYYMMDD
public static final TimestampFormat YYYYMMDDHHMMSS
public static final TimestampFormat YYYYMMDDHHMMSSMsec
public static final TimestampFormat YYYYMMDDHHMMSSUsec
public static final TimestampFormat YYYYMMDDHHMMSSNsec
public static final TimestampFormat YYYYMMDDHHMMSSPsec
public static TimestampFormat[] values()
for (TimestampFormat c : TimestampFormat.values()) System.out.println(c);
public static TimestampFormat valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getLength()
public static TimestampFormat getByLengthOrNull(int length)
length
- The length of the timestamp format.TimestampFormat
if found, otherwise null
.Copyright © 2005–2025 Onix Solutions. All rights reserved.