getValues(boolean deep);
-
- /**
- * Checks if this {@link ConfigurationSection} contains the given path.
- *
- * If the value for the requested path does not exist but a default value has
- * been specified, this will return true.
- *
- * @param path Path to check for existence.
- * @return True if this section contains the requested path, either via default
- * or being set.
- * @throws IllegalArgumentException Thrown when path is null.
- */
- public boolean contains(@NotNull String path);
-
- /**
- * Checks if this {@link ConfigurationSection} contains the given path.
- *
- * If the value for the requested path does not exist, the boolean parameter of
- * true has been specified, a default value for the path exists, this will
- * return true.
- *
- * If a boolean parameter of false has been specified, true will only be
- * returned if there is a set value for the specified path.
- *
- * @param path Path to check for existence.
- * @param ignoreDefault Whether or not to ignore if a default value for the
- * specified path exists.
- * @return True if this section contains the requested path, or if a default
- * value exist and the boolean parameter for this method is true.
- * @throws IllegalArgumentException Thrown when path is null.
- */
- public boolean contains(@NotNull String path, boolean ignoreDefault);
-
- /**
- * Checks if this {@link ConfigurationSection} has a value set for the given
- * path.
- *
- * If the value for the requested path does not exist but a default value has
- * been specified, this will still return false.
- *
- * @param path Path to check for existence.
- * @return True if this section contains the requested path, regardless of
- * having a default.
- * @throws IllegalArgumentException Thrown when path is null.
- */
- public boolean isSet(@NotNull String path);
-
- /**
- * Gets the path of this {@link ConfigurationSection} from its root
- * {@link Configuration}
- *
- * For any {@link Configuration} themselves, this will return an empty string.
- *
- * If the section is no longer contained within its root for any reason, such as
- * being replaced with a different value, this may return null.
- *
- * To retrieve the single name of this section, that is, the final part of the
- * path returned by this method, you may use {@link #getName()}.
- *
- * @return Path of this section relative to its root
- */
- @Nullable
- public String getCurrentPath();
-
- /**
- * Gets the name of this individual {@link ConfigurationSection}, in the path.
- *
- * This will always be the final part of {@link #getCurrentPath()}, unless the
- * section is orphaned.
- *
- * @return Name of this section
- */
- @NotNull
- public String getName();
-
- /**
- * Gets the root {@link Configuration} that contains this
- * {@link ConfigurationSection}
- *
- * For any {@link Configuration} themselves, this will return its own object.
- *
- * If the section is no longer contained within its root for any reason, such as
- * being replaced with a different value, this may return null.
- *
- * @return Root configuration containing this section.
- */
- @Nullable
- public Configuration getRoot();
-
- /**
- * Gets the parent {@link ConfigurationSection} that directly contains this
- * {@link ConfigurationSection}.
- *
- * For any {@link Configuration} themselves, this will return null.
- *
- * If the section is no longer contained within its parent for any reason, such
- * as being replaced with a different value, this may return null.
- *
- * @return Parent section containing this section.
- */
- @Nullable
- public ConfigurationSection getParent();
-
- /**
- * Gets the requested Object by path.
- *
- * If the Object does not exist but a default value has been specified, this
- * will return the default value. If the Object does not exist and no default
- * value was specified, this will return null.
- *
- * @param path Path of the Object to get.
- * @return Requested Object.
- */
- @Nullable
- public Object get(@NotNull String path);
-
- /**
- * Gets the requested Object by path, returning a default value if not found.
- *
- * If the Object does not exist then the specified default value will returned
- * regardless of if a default has been identified in the root
- * {@link Configuration}.
- *
- * @param path Path of the Object to get.
- * @param def The default value to return if the path is not found.
- * @return Requested Object.
- */
- @Nullable
- public Object get(@NotNull String path, @Nullable Object def);
-
- /**
- * Sets the specified path to the given value.
- *
- * If value is null, the entry will be removed. Any existing entry will be
- * replaced, regardless of what the new value is.
- *
- * Some implementations may have limitations on what you may store. See their
- * individual javadocs for details. No implementations should allow you to store
- * {@link Configuration}s or {@link ConfigurationSection}s, please use
- * {@link #createSection(java.lang.String)} for that.
- *
- * @param path Path of the object to set.
- * @param value New value to set the path to.
- */
- public void set(@NotNull String path, @Nullable Object value);
-
- /**
- * Creates an empty {@link ConfigurationSection} at the specified path.
- *
- * Any value that was previously set at this path will be overwritten. If the
- * previous value was itself a {@link ConfigurationSection}, it will be
- * orphaned.
- *
- * @param path Path to create the section at.
- * @return Newly created section
- */
- @NotNull
- public ConfigurationSection createSection(@NotNull String path);
-
- /**
- * Creates a {@link ConfigurationSection} at the specified path, with specified
- * values.
- *
- * Any value that was previously set at this path will be overwritten. If the
- * previous value was itself a {@link ConfigurationSection}, it will be
- * orphaned.
- *
- * @param path Path to create the section at.
- * @param map The values to used.
- * @return Newly created section
- */
- @NotNull
- public ConfigurationSection createSection(@NotNull String path, @NotNull Map, ?> map);
-
- // Primitives
- /**
- * Gets the requested String by path.
- *
- * If the String does not exist but a default value has been specified, this
- * will return the default value. If the String does not exist and no default
- * value was specified, this will return null.
- *
- * @param path Path of the String to get.
- * @return Requested String.
- */
- @Nullable
- public String getString(@NotNull String path);
-
- /**
- * Gets the requested String by path, returning a default value if not found.
- *
- * If the String does not exist then the specified default value will returned
- * regardless of if a default has been identified in the root
- * {@link Configuration}.
- *
- * @param path Path of the String to get.
- * @param def The default value to return if the path is not found or is not a
- * String.
- * @return Requested String.
- */
- @Nullable
- public String getString(@NotNull String path, @Nullable String def);
-
- /**
- * Checks if the specified path is a String.
- *
- * If the path exists but is not a String, this will return false. If the path
- * does not exist, this will return false. If the path does not exist but a
- * default value has been specified, this will check if that default value is a
- * String and return appropriately.
- *
- * @param path Path of the String to check.
- * @return Whether or not the specified path is a String.
- */
- public boolean isString(@NotNull String path);
-
- /**
- * Gets the requested int by path.
- *
- * If the int does not exist but a default value has been specified, this will
- * return the default value. If the int does not exist and no default value was
- * specified, this will return 0.
- *
- * @param path Path of the int to get.
- * @return Requested int.
- */
- public int getInt(@NotNull String path);
-
- /**
- * Gets the requested int by path, returning a default value if not found.
- *
- * If the int does not exist then the specified default value will returned
- * regardless of if a default has been identified in the root
- * {@link Configuration}.
- *
- * @param path Path of the int to get.
- * @param def The default value to return if the path is not found or is not an
- * int.
- * @return Requested int.
- */
- public int getInt(@NotNull String path, int def);
-
- /**
- * Checks if the specified path is an int.
- *
- * If the path exists but is not a int, this will return false. If the path does
- * not exist, this will return false. If the path does not exist but a default
- * value has been specified, this will check if that default value is a int and
- * return appropriately.
- *
- * @param path Path of the int to check.
- * @return Whether or not the specified path is an int.
- */
- public boolean isInt(@NotNull String path);
-
- /**
- * Gets the requested boolean by path.
- *
- * If the boolean does not exist but a default value has been specified, this
- * will return the default value. If the boolean does not exist and no default
- * value was specified, this will return false.
- *
- * @param path Path of the boolean to get.
- * @return Requested boolean.
- */
- public boolean getBoolean(@NotNull String path);
-
- /**
- * Gets the requested boolean by path, returning a default value if not found.
- *
- * If the boolean does not exist then the specified default value will returned
- * regardless of if a default has been identified in the root
- * {@link Configuration}.
- *
- * @param path Path of the boolean to get.
- * @param def The default value to return if the path is not found or is not a
- * boolean.
- * @return Requested boolean.
- */
- public boolean getBoolean(@NotNull String path, boolean def);
-
- /**
- * Checks if the specified path is a boolean.
- *
- * If the path exists but is not a boolean, this will return false. If the path
- * does not exist, this will return false. If the path does not exist but a
- * default value has been specified, this will check if that default value is a
- * boolean and return appropriately.
- *
- * @param path Path of the boolean to check.
- * @return Whether or not the specified path is a boolean.
- */
- public boolean isBoolean(@NotNull String path);
-
- /**
- * Gets the requested double by path.
- *
- * If the double does not exist but a default value has been specified, this
- * will return the default value. If the double does not exist and no default
- * value was specified, this will return 0.
- *
- * @param path Path of the double to get.
- * @return Requested double.
- */
- public double getDouble(@NotNull String path);
-
- /**
- * Gets the requested double by path, returning a default value if not found.
- *
- * If the double does not exist then the specified default value will returned
- * regardless of if a default has been identified in the root
- * {@link Configuration}.
- *
- * @param path Path of the double to get.
- * @param def The default value to return if the path is not found or is not a
- * double.
- * @return Requested double.
- */
- public double getDouble(@NotNull String path, double def);
-
- /**
- * Checks if the specified path is a double.
- *
- * If the path exists but is not a double, this will return false. If the path
- * does not exist, this will return false. If the path does not exist but a
- * default value has been specified, this will check if that default value is a
- * double and return appropriately.
- *
- * @param path Path of the double to check.
- * @return Whether or not the specified path is a double.
- */
- public boolean isDouble(@NotNull String path);
-
- /**
- * Gets the requested long by path.
- *
- * If the long does not exist but a default value has been specified, this will
- * return the default value. If the long does not exist and no default value was
- * specified, this will return 0.
- *
- * @param path Path of the long to get.
- * @return Requested long.
- */
- public long getLong(@NotNull String path);
-
- /**
- * Gets the requested long by path, returning a default value if not found.
- *
- * If the long does not exist then the specified default value will returned
- * regardless of if a default has been identified in the root
- * {@link Configuration}.
- *
- * @param path Path of the long to get.
- * @param def The default value to return if the path is not found or is not a
- * long.
- * @return Requested long.
- */
- public long getLong(@NotNull String path, long def);
-
- /**
- * Checks if the specified path is a long.
- *
- * If the path exists but is not a long, this will return false. If the path
- * does not exist, this will return false. If the path does not exist but a
- * default value has been specified, this will check if that default value is a
- * long and return appropriately.
- *
- * @param path Path of the long to check.
- * @return Whether or not the specified path is a long.
- */
- public boolean isLong(@NotNull String path);
-
- // Java
- /**
- * Gets the requested List by path.
- *
- * If the List does not exist but a default value has been specified, this will
- * return the default value. If the List does not exist and no default value was
- * specified, this will return null.
- *
- * @param path Path of the List to get.
- * @return Requested List.
- */
- @Nullable
- public List> getList(@NotNull String path);
-
- /**
- * Gets the requested List by path, returning a default value if not found.
- *
- * If the List does not exist then the specified default value will returned
- * regardless of if a default has been identified in the root
- * {@link Configuration}.
- *
- * @param path Path of the List to get.
- * @param def The default value to return if the path is not found or is not a
- * List.
- * @return Requested List.
- */
- @Nullable
- public List> getList(@NotNull String path, @Nullable List> def);
-
- /**
- * Checks if the specified path is a List.
- *
- * If the path exists but is not a List, this will return false. If the path
- * does not exist, this will return false. If the path does not exist but a
- * default value has been specified, this will check if that default value is a
- * List and return appropriately.
- *
- * @param path Path of the List to check.
- * @return Whether or not the specified path is a List.
- */
- public boolean isList(@NotNull String path);
-
- /**
- * Gets the requested List of String by path.
- *
- * If the List does not exist but a default value has been specified, this will
- * return the default value. If the List does not exist and no default value was
- * specified, this will return an empty List.
- *
- * This method will attempt to cast any values into a String if possible, but
- * may miss any values out if they are not compatible.
- *
- * @param path Path of the List to get.
- * @return Requested List of String.
- */
- @NotNull
- public List getStringList(@NotNull String path);
-
- /**
- * Gets the requested List of Integer by path.
- *
- * If the List does not exist but a default value has been specified, this will
- * return the default value. If the List does not exist and no default value was
- * specified, this will return an empty List.
- *
- * This method will attempt to cast any values into a Integer if possible, but
- * may miss any values out if they are not compatible.
- *
- * @param path Path of the List to get.
- * @return Requested List of Integer.
- */
- @NotNull
- public List getIntegerList(@NotNull String path);
-
- /**
- * Gets the requested List of Boolean by path.
- *
- * If the List does not exist but a default value has been specified, this will
- * return the default value. If the List does not exist and no default value was
- * specified, this will return an empty List.
- *
- * This method will attempt to cast any values into a Boolean if possible, but
- * may miss any values out if they are not compatible.
- *
- * @param path Path of the List to get.
- * @return Requested List of Boolean.
- */
- @NotNull
- public List getBooleanList(@NotNull String path);
-
- /**
- * Gets the requested List of Double by path.
- *
- * If the List does not exist but a default value has been specified, this will
- * return the default value. If the List does not exist and no default value was
- * specified, this will return an empty List.
- *
- * This method will attempt to cast any values into a Double if possible, but
- * may miss any values out if they are not compatible.
- *
- * @param path Path of the List to get.
- * @return Requested List of Double.
- */
- @NotNull
- public List getDoubleList(@NotNull String path);
-
- /**
- * Gets the requested List of Float by path.
- *
- * If the List does not exist but a default value has been specified, this will
- * return the default value. If the List does not exist and no default value was
- * specified, this will return an empty List.
- *
- * This method will attempt to cast any values into a Float if possible, but may
- * miss any values out if they are not compatible.
- *
- * @param path Path of the List to get.
- * @return Requested List of Float.
- */
- @NotNull
- public List getFloatList(@NotNull String path);
-
- /**
- * Gets the requested List of Long by path.
- *
- * If the List does not exist but a default value has been specified, this will
- * return the default value. If the List does not exist and no default value was
- * specified, this will return an empty List.
- *
- * This method will attempt to cast any values into a Long if possible, but may
- * miss any values out if they are not compatible.
- *
- * @param path Path of the List to get.
- * @return Requested List of Long.
- */
- @NotNull
- public List getLongList(@NotNull String path);
-
- /**
- * Gets the requested List of Byte by path.
- *
- * If the List does not exist but a default value has been specified, this will
- * return the default value. If the List does not exist and no default value was
- * specified, this will return an empty List.
- *
- * This method will attempt to cast any values into a Byte if possible, but may
- * miss any values out if they are not compatible.
- *
- * @param path Path of the List to get.
- * @return Requested List of Byte.
- */
- @NotNull
- public List getByteList(@NotNull String path);
-
- /**
- * Gets the requested List of Character by path.
- *
- * If the List does not exist but a default value has been specified, this will
- * return the default value. If the List does not exist and no default value was
- * specified, this will return an empty List.
- *
- * This method will attempt to cast any values into a Character if possible, but
- * may miss any values out if they are not compatible.
- *
- * @param path Path of the List to get.
- * @return Requested List of Character.
- */
- @NotNull
- public List getCharacterList(@NotNull String path);
-
- /**
- * Gets the requested List of Short by path.
- *
- * If the List does not exist but a default value has been specified, this will
- * return the default value. If the List does not exist and no default value was
- * specified, this will return an empty List.
- *
- * This method will attempt to cast any values into a Short if possible, but may
- * miss any values out if they are not compatible.
- *
- * @param path Path of the List to get.
- * @return Requested List of Short.
- */
- @NotNull
- public List getShortList(@NotNull String path);
-
- /**
- * Gets the requested List of Maps by path.
- *
- * If the List does not exist but a default value has been specified, this will
- * return the default value. If the List does not exist and no default value was
- * specified, this will return an empty List.
- *
- * This method will attempt to cast any values into a Map if possible, but may
- * miss any values out if they are not compatible.
- *
- * @param path Path of the List to get.
- * @return Requested List of Maps.
- */
- @NotNull
- public List