Enum DateTimeTruncation
- java.lang.Object
-
- java.lang.Enum<DateTimeTruncation>
-
- com.github.tomakehurst.wiremock.common.DateTimeTruncation
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<DateTimeTruncation>
public enum DateTimeTruncation extends java.lang.Enum<DateTimeTruncation>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FIRST_DAY_OF_MONTH
FIRST_DAY_OF_NEXT_MONTH
FIRST_DAY_OF_NEXT_YEAR
FIRST_DAY_OF_YEAR
FIRST_HOUR_OF_DAY
FIRST_MINUTE_OF_HOUR
FIRST_SECOND_OF_MINUTE
LAST_DAY_OF_MONTH
LAST_DAY_OF_YEAR
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DateTimeTruncation
fromString(java.lang.String value)
java.lang.String
toString()
java.time.ZonedDateTime
truncate(java.time.ZonedDateTime input)
java.util.Date
truncate(java.util.Date input)
static DateTimeTruncation
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static DateTimeTruncation[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FIRST_SECOND_OF_MINUTE
public static final DateTimeTruncation FIRST_SECOND_OF_MINUTE
-
FIRST_MINUTE_OF_HOUR
public static final DateTimeTruncation FIRST_MINUTE_OF_HOUR
-
FIRST_HOUR_OF_DAY
public static final DateTimeTruncation FIRST_HOUR_OF_DAY
-
FIRST_DAY_OF_MONTH
public static final DateTimeTruncation FIRST_DAY_OF_MONTH
-
FIRST_DAY_OF_NEXT_MONTH
public static final DateTimeTruncation FIRST_DAY_OF_NEXT_MONTH
-
LAST_DAY_OF_MONTH
public static final DateTimeTruncation LAST_DAY_OF_MONTH
-
FIRST_DAY_OF_YEAR
public static final DateTimeTruncation FIRST_DAY_OF_YEAR
-
FIRST_DAY_OF_NEXT_YEAR
public static final DateTimeTruncation FIRST_DAY_OF_NEXT_YEAR
-
LAST_DAY_OF_YEAR
public static final DateTimeTruncation LAST_DAY_OF_YEAR
-
-
Method Detail
-
values
public static DateTimeTruncation[] 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 (DateTimeTruncation c : DateTimeTruncation.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DateTimeTruncation valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
truncate
public java.time.ZonedDateTime truncate(java.time.ZonedDateTime input)
-
truncate
public java.util.Date truncate(java.util.Date input)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<DateTimeTruncation>
-
fromString
public static DateTimeTruncation fromString(java.lang.String value)
-
-