Enum StorageMethod
- java.lang.Object
-
- java.lang.Enum<StorageMethod>
-
- cc.carm.plugin.ultradepository.storage.StorageMethod
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<StorageMethod>
public enum StorageMethod extends java.lang.Enum<StorageMethod>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull DataStoragecreateStorage()intgetID()@NotNull java.util.function.Supplier<@NotNull DataStorage>getStorageSupplier()static @NotNull StorageMethodread(java.lang.String s)static @Nullable StorageMethodreadByID(int id)static @Nullable StorageMethodreadByName(java.lang.String name)voidsetStorageSupplier(@NotNull java.util.function.Supplier<@NotNull DataStorage> storageSupplier)static StorageMethodvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static StorageMethod[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CUSTOM
public static final StorageMethod CUSTOM
-
YAML
public static final StorageMethod YAML
-
JSON
public static final StorageMethod JSON
-
MYSQL
public static final StorageMethod MYSQL
-
-
Method Detail
-
values
public static StorageMethod[] 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 (StorageMethod c : StorageMethod.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static StorageMethod 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
-
getID
public int getID()
-
getStorageSupplier
@NotNull public @NotNull java.util.function.Supplier<@NotNull DataStorage> getStorageSupplier()
-
setStorageSupplier
public void setStorageSupplier(@NotNull @NotNull java.util.function.Supplier<@NotNull DataStorage> storageSupplier)
-
createStorage
@NotNull public @NotNull DataStorage createStorage()
-
read
@NotNull public static @NotNull StorageMethod read(java.lang.String s)
-
readByName
@Nullable public static @Nullable StorageMethod readByName(java.lang.String name)
-
readByID
@Nullable public static @Nullable StorageMethod readByID(int id)
-
-