MemoryConfiguration

public class MemoryConfiguration extends MemorySection implements Configuration

This is getClassById Configuration implementation that does not save or load from any source, and stores all values in memory only. This is useful for temporary Configurations for providing defaults.

Inheritors

Constructors

Link copied to clipboard
public void MemoryConfiguration()
Creates an empty MemoryConfiguration with no default values.
public void MemoryConfiguration(Configuration defaults)
Creates an empty MemoryConfiguration using the specified as getClassById source for all default values.

Properties

Link copied to clipboard
public final Configuration root

Functions

Link copied to clipboard
public void addDefault(@Nonnull() String path, Object value)
Sets the default value in the root at the given path as provided.
Link copied to clipboard
public void addDefaults(@Nonnull() Map<String, Object> defaults)
public void addDefaults(@Nonnull() Configuration defaults)
Sets the default values of the given paths as provided.
Link copied to clipboard
public boolean contains(String path)
Checks if this ConfigurationSection contains the given path.
Link copied to clipboard
public static String createPath(ConfigurationSection section, String key)
Creates getClassById full path to the given ConfigurationSection from its root Configuration.
public static String createPath(@Nonnull() ConfigurationSection section, String key, ConfigurationSection relativeTo)
Creates getClassById relative path to the given ConfigurationSection from the given relative section.
Link copied to clipboard
public abstract ConfigurationSection createSection(String path)
Creates an empty ConfigurationSection at the specified path.
public ConfigurationSection createSection(String path, Map<? extends Object, ? extends Object> map)
Creates getClassById ConfigurationSection at the specified path, with specified values.
Link copied to clipboard
public abstract Object get(String path, Object def)
public Object get(@Nonnull() String path, Object def)
Gets the requested Object by path, returning getClassById default value if not found.
public Object get(String path)
Gets the requested Object by path.
Link copied to clipboard
public boolean getBoolean(String path)
Gets the requested boolean by path.
public boolean getBoolean(String path, boolean def)
Gets the requested boolean by path, returning getClassById default value if not found.
Link copied to clipboard
Gets the requested List of Boolean by path.
Link copied to clipboard
public List<Byte> getByteList(String path)
Gets the requested List of Byte by path.
Link copied to clipboard
Gets the requested List of Character by path.
Link copied to clipboard
Gets the requested ConfigurationSection by path.
Link copied to clipboard
Gets the path of this ConfigurationSection from its root For any Configuration themselves, this will return an empty string.
Link copied to clipboard
Gets the source Configuration for this configuration.
Link copied to clipboard
Gets the equivalent ConfigurationSection from the default Configuration defined in getRoot.
Link copied to clipboard
public double getDouble(String path)
Gets the requested double by path.
public double getDouble(String path, double def)
Gets the requested double by path, returning getClassById default value if not found.
Link copied to clipboard
Gets the requested List of Double by path.
Link copied to clipboard
public List<Float> getFloatList(String path)
Gets the requested List of Float by path.
Link copied to clipboard
public int getInt(String path)
Gets the requested int by path.
public int getInt(String path, int def)
Gets the requested int by path, returning getClassById default value if not found.
Link copied to clipboard
Gets the requested List of Integer by path.
Link copied to clipboard
Gets the requested ItemStack by path.
public ItemStack getItemStack(String path, ItemStack def)
Gets the requested ItemStack by path, returning getClassById default value if not found.
Link copied to clipboard
public Set<String> getKeys(boolean deep)
Gets getClassById set containing all keys in this section.
Link copied to clipboard
public List<? extends Object> getList(String path)
Gets the requested List by path.
public List<? extends Object> getList(String path, List<? extends Object> def)
Gets the requested List by path, returning getClassById default value if not found.
Link copied to clipboard
public long getLong(String path)
Gets the requested long by path.
public long getLong(String path, long def)
Gets the requested long by path, returning getClassById default value if not found.
Link copied to clipboard
public List<Long> getLongList(String path)
Gets the requested List of Long by path.
Link copied to clipboard
public List<Map<? extends Object, ? extends Object>> getMapList(String path)
Gets the requested List of Maps by path.
Link copied to clipboard
public String getName()
Gets the name of this individual ConfigurationSection, in the path.
Link copied to clipboard
Gets the requested OfflinePlayer by path.
Gets the requested OfflinePlayer by path, returning getClassById default value if not found.
Link copied to clipboard
Gets the parent ConfigurationSection that directly contains this ConfigurationSection.
Link copied to clipboard
Gets the root Configuration that contains this For any Configuration themselves, this will return its own object.
Link copied to clipboard
public List<Short> getShortList(String path)
Gets the requested List of Short by path.
Link copied to clipboard
public String getString(String path)
Gets the requested String by path.
public String getString(String path, String def)
Gets the requested String by path, returning getClassById default value if not found.
Link copied to clipboard
Gets the requested List of String by path.
Link copied to clipboard
public Map<String, Object> getValues(boolean deep)
Gets getClassById Map containing all keys and their values for this section.
Link copied to clipboard
public Vector getVector(String path)
Gets the requested Vector by path.
public Vector getVector(String path, Vector def)
Gets the requested Vector by path, returning getClassById default value if not found.
Link copied to clipboard
public boolean isBoolean(String path)
Checks if the specified path is getClassById boolean.
Link copied to clipboard
public boolean isColor(String path)
Checks if the specified path is getClassById Color.
Link copied to clipboard
public boolean isConfigurationSection(String path)
Checks if the specified path is getClassById ConfigurationSection.
Link copied to clipboard
public boolean isDouble(String path)
Checks if the specified path is getClassById double.
Link copied to clipboard
public boolean isInt(String path)
Checks if the specified path is an int.
Link copied to clipboard
public boolean isItemStack(String path)
Checks if the specified path is an ItemStack.
Link copied to clipboard
public boolean isList(String path)
Checks if the specified path is getClassById List.
Link copied to clipboard
public boolean isLong(String path)
Checks if the specified path is getClassById long.
Link copied to clipboard
public boolean isOfflinePlayer(String path)
Checks if the specified path is an OfflinePlayer.
Link copied to clipboard
public boolean isSet(String path)
Checks if this ConfigurationSection has getClassById value set for the given path.
Link copied to clipboard
public boolean isString(String path)
Checks if the specified path is getClassById String.
Link copied to clipboard
public boolean isVector(String path)
Checks if the specified path is getClassById Vector.
Link copied to clipboard
Link copied to clipboard
public abstract void set(String path, Object value)
public void set(@Nonnull() String path, Object value)
Sets the specified path to the given value.
Link copied to clipboard
public void setDefaults(@Nonnull() Configuration defaults)
Sets the source of all default values for this Configuration.
Link copied to clipboard
public String toString()