Enum NamedInstantPattern
- java.lang.Object
-
- java.lang.Enum<NamedInstantPattern>
-
- org.apache.logging.log4j.core.pattern.NamedInstantPattern
-
- All Implemented Interfaces:
Serializable,Comparable<NamedInstantPattern>
@NullMarked public enum NamedInstantPattern extends Enum<NamedInstantPattern>
Represents named date & time patterns for formatting log timestamps.- Since:
- 2.26.0
- See Also:
DatePatternConverter
-
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetPattern()Returns the date-time pattern string compatible withDateTimeFormatterthat is associated with this named pattern.static NamedInstantPatternvalueOf(String name)Returns the enum constant of this type with the specified name.static NamedInstantPattern[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ABSOLUTE
public static final NamedInstantPattern ABSOLUTE
-
ABSOLUTE_MICROS
public static final NamedInstantPattern ABSOLUTE_MICROS
-
ABSOLUTE_NANOS
public static final NamedInstantPattern ABSOLUTE_NANOS
-
ABSOLUTE_PERIOD
public static final NamedInstantPattern ABSOLUTE_PERIOD
-
COMPACT
public static final NamedInstantPattern COMPACT
-
DATE
public static final NamedInstantPattern DATE
-
DATE_PERIOD
public static final NamedInstantPattern DATE_PERIOD
-
DEFAULT
public static final NamedInstantPattern DEFAULT
-
DEFAULT_MICROS
public static final NamedInstantPattern DEFAULT_MICROS
-
DEFAULT_NANOS
public static final NamedInstantPattern DEFAULT_NANOS
-
DEFAULT_PERIOD
public static final NamedInstantPattern DEFAULT_PERIOD
-
ISO8601_BASIC
public static final NamedInstantPattern ISO8601_BASIC
-
ISO8601_BASIC_PERIOD
public static final NamedInstantPattern ISO8601_BASIC_PERIOD
-
ISO8601
public static final NamedInstantPattern ISO8601
-
ISO8601_OFFSET_DATE_TIME_HH
public static final NamedInstantPattern ISO8601_OFFSET_DATE_TIME_HH
-
ISO8601_OFFSET_DATE_TIME_HHMM
public static final NamedInstantPattern ISO8601_OFFSET_DATE_TIME_HHMM
-
ISO8601_OFFSET_DATE_TIME_HHCMM
public static final NamedInstantPattern ISO8601_OFFSET_DATE_TIME_HHCMM
-
ISO8601_PERIOD
public static final NamedInstantPattern ISO8601_PERIOD
-
ISO8601_PERIOD_MICROS
public static final NamedInstantPattern ISO8601_PERIOD_MICROS
-
US_MONTH_DAY_YEAR2_TIME
public static final NamedInstantPattern US_MONTH_DAY_YEAR2_TIME
-
US_MONTH_DAY_YEAR4_TIME
public static final NamedInstantPattern US_MONTH_DAY_YEAR4_TIME
-
-
Method Detail
-
values
public static NamedInstantPattern[] 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 (NamedInstantPattern c : NamedInstantPattern.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NamedInstantPattern 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
-
getPattern
public String getPattern()
Returns the date-time pattern string compatible withDateTimeFormatterthat is associated with this named pattern.- Returns:
- the date-time pattern string for use with
DateTimeFormatter
-
-