Enum DateTimeFormat
- java.lang.Object
-
- java.lang.Enum<DateTimeFormat>
-
- io.trino.plugin.kafka.encoder.json.format.DateTimeFormat
-
- All Implemented Interfaces:
Serializable,Comparable<DateTimeFormat>
public enum DateTimeFormat extends Enum<DateTimeFormat>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CUSTOM_DATE_TIMEISO8601MILLISECONDS_SINCE_EPOCHRFC2822SECONDS_SINCE_EPOCH
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonDateTimeFormattergetFormatter(Optional<String> pattern)booleanisSupportedType(Type type)StringtoString()static DateTimeFormatvalueOf(String name)Returns the enum constant of this type with the specified name.static DateTimeFormat[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CUSTOM_DATE_TIME
public static final DateTimeFormat CUSTOM_DATE_TIME
-
ISO8601
public static final DateTimeFormat ISO8601
-
RFC2822
public static final DateTimeFormat RFC2822
-
MILLISECONDS_SINCE_EPOCH
public static final DateTimeFormat MILLISECONDS_SINCE_EPOCH
-
SECONDS_SINCE_EPOCH
public static final DateTimeFormat SECONDS_SINCE_EPOCH
-
-
Method Detail
-
values
public static DateTimeFormat[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DateTimeFormat c : DateTimeFormat.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DateTimeFormat valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
isSupportedType
public boolean isSupportedType(Type type)
-
getFormatter
public JsonDateTimeFormatter getFormatter(Optional<String> pattern)
-
toString
public String toString()
- Overrides:
toStringin classEnum<DateTimeFormat>
-
-