Package xyz.srnyx.annoyingapi.storage
Enum Class StorageConfig.SaveOn
- All Implemented Interfaces:
Serializable,Comparable<StorageConfig.SaveOn>,Constable
- Enclosing class:
StorageConfig
Valid values for
storage.yml's cache.save-on option-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Optional<StorageConfig.SaveOn> fromString(@Nullable String string) Converts the specified string to aStorageConfig.SaveOnvaluestatic StorageConfig.SaveOnReturns the enum constant of this class with the specified name.static StorageConfig.SaveOn[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
RELOAD
Saves the cache on plugin reload- See Also:
-
DISABLE
Saves the cache on plugin disable- See Also:
-
INTERVAL
Saves the cache on an interval- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException- if the argument is null
-
fromString
@NotNull public static @NotNull Optional<StorageConfig.SaveOn> fromString(@Nullable @Nullable String string) Converts the specified string to aStorageConfig.SaveOnvalue- Parameters:
string- the string to convert- Returns:
- the converted value, or empty if the string is invalid
-