Class UnmodifiableConfigWrapper<C extends UnmodifiableConfig>
java.lang.Object
com.electronwill.nightconfig.core.utils.UnmodifiableConfigWrapper<C>
- All Implemented Interfaces:
UnmodifiableConfig
- Direct Known Subclasses:
ConfigWrapper,FakeUnmodifiableCommentedConfig
public abstract class UnmodifiableConfigWrapper<C extends UnmodifiableConfig>
extends Object
implements UnmodifiableConfig
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.electronwill.nightconfig.core.UnmodifiableConfig
UnmodifiableConfig.Entry -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConfigFormat<?>Returns the config's format.booleanChecks if the config contains a value at some path.Set<? extends UnmodifiableConfig.Entry>entrySet()Returns a Set view of the config's entries.boolean<T> TGets a value from the config.inthashCode()booleanisEmpty()Checks if the config is empty.intsize()Gets the size of the config.valueMap()Returns a Map view of the config's values.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.electronwill.nightconfig.core.UnmodifiableConfig
apply, apply, contains, get, get, getByte, getByte, getByteOrElse, getByteOrElse, getChar, getChar, getCharOrElse, getCharOrElse, getEnum, getEnum, getEnum, getEnum, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getEnumOrElse, getInt, getInt, getIntOrElse, getIntOrElse, getIntOrElse, getIntOrElse, getLong, getLong, getLongOrElse, getLongOrElse, getLongOrElse, getLongOrElse, getOptional, getOptional, getOptionalEnum, getOptionalEnum, getOptionalEnum, getOptionalEnum, getOptionalInt, getOptionalInt, getOptionalLong, getOptionalLong, getOrElse, getOrElse, getOrElse, getOrElse, getRaw, getShort, getShort, getShortOrElse, getShortOrElse, isNull, isNull
-
Field Details
-
config
-
-
Constructor Details
-
UnmodifiableConfigWrapper
-
-
Method Details
-
getRaw
Description copied from interface:UnmodifiableConfigGets a value from the config. Doesn't convertNullObject.NULL_OBJECTtonull.- Specified by:
getRawin interfaceUnmodifiableConfig- Type Parameters:
T- the value's type- Parameters:
path- the value's path, each element of the list is a different part of the path.- Returns:
- the value at the given path, or
nullif there is no such value.
-
valueMap
Description copied from interface:UnmodifiableConfigReturns a Map view of the config's values. If the config is unmodifiable then the returned map is unmodifiable too.- Specified by:
valueMapin interfaceUnmodifiableConfig- Returns:
- a Map view of the config's values.
-
entrySet
Description copied from interface:UnmodifiableConfigReturns a Set view of the config's entries. If the config is unmodifiable then the returned set is unmodifiable too.- Specified by:
entrySetin interfaceUnmodifiableConfig- Returns:
- a Set view of the config's entries.
-
contains
Description copied from interface:UnmodifiableConfigChecks if the config contains a value at some path.- Specified by:
containsin interfaceUnmodifiableConfig- Parameters:
path- the path to check, each element of the list is a different part of the path.- Returns:
trueif the path is associated with a value,falseif it's not.
-
size
public int size()Description copied from interface:UnmodifiableConfigGets the size of the config.- Specified by:
sizein interfaceUnmodifiableConfig- Returns:
- the number of top-level elements in the config.
-
isEmpty
public boolean isEmpty()Description copied from interface:UnmodifiableConfigChecks if the config is empty.- Specified by:
isEmptyin interfaceUnmodifiableConfig- Returns:
trueif the config is empty,falseif it contains at least one element.
-
equals
-
hashCode
public int hashCode() -
configFormat
Description copied from interface:UnmodifiableConfigReturns the config's format.- Specified by:
configFormatin interfaceUnmodifiableConfig- Returns:
- the config's format
-