public enum CurrentDateTimeProvider extends Enum<CurrentDateTimeProvider> implements DateTimeProvider
DateTimeProvider
simply creating new LocalDateTime
instances for each method call.Enum Constant and Description |
---|
INSTANCE |
Modifier and Type | Method and Description |
---|---|
Optional<TemporalAccessor> |
getNow()
Returns the current time to be used as modification or creation date.
|
static CurrentDateTimeProvider |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CurrentDateTimeProvider[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CurrentDateTimeProvider INSTANCE
public static CurrentDateTimeProvider[] values()
for (CurrentDateTimeProvider c : CurrentDateTimeProvider.values()) System.out.println(c);
public static CurrentDateTimeProvider 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 Optional<TemporalAccessor> getNow()
DateTimeProvider
getNow
in interface DateTimeProvider
Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.