Package xyz.srnyx.annoyingapi.storage
Enum StorageConfig.SaveOn
- java.lang.Object
-
- java.lang.Enum<StorageConfig.SaveOn>
-
- xyz.srnyx.annoyingapi.storage.StorageConfig.SaveOn
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<StorageConfig.SaveOn>
- Enclosing class:
- StorageConfig
public static enum StorageConfig.SaveOn extends java.lang.Enum<StorageConfig.SaveOn>
Valid values forstorage.yml'scache.save-onoption
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static @NotNull java.util.Optional<StorageConfig.SaveOn>fromString(@Nullable java.lang.String string)Converts the specified string to aStorageConfig.SaveOnvaluestatic StorageConfig.SaveOnvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static StorageConfig.SaveOn[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
RELOAD
public static final StorageConfig.SaveOn RELOAD
Saves the cache on plugin reload- See Also:
AnnoyingPlugin.reload()
-
DISABLE
public static final StorageConfig.SaveOn DISABLE
Saves the cache on plugin disable- See Also:
AnnoyingPlugin.disable()
-
INTERVAL
public static final StorageConfig.SaveOn INTERVAL
Saves the cache on an interval- See Also:
StorageConfig.Cache.interval
-
-
Method Detail
-
values
public static StorageConfig.SaveOn[] 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 (StorageConfig.SaveOn c : StorageConfig.SaveOn.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StorageConfig.SaveOn 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
-
fromString
@NotNull public static @NotNull java.util.Optional<StorageConfig.SaveOn> fromString(@Nullable @Nullable java.lang.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
-
-