Record Class ConfigReaderSpigot
java.lang.Object
java.lang.Record
nl.pim16aap2.animatedarchitecture.spigot.util.implementations.ConfigReaderSpigot
- All Implemented Interfaces:
IConfigReader
public record ConfigReaderSpigot(org.bukkit.configuration.file.FileConfiguration config)
extends Record
implements IConfigReader
Spigot implementation for
IConfigReader.-
Constructor Summary
ConstructorsConstructorDescriptionConfigReaderSpigot(org.bukkit.configuration.file.FileConfiguration config) Creates an instance of aConfigReaderSpigotrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.configuration.file.FileConfigurationconfig()Returns the value of theconfigrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable ObjectGets the value of a config option at a given path.getKeys()Gets a set containing all keys.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ConfigReaderSpigot
public ConfigReaderSpigot(org.bukkit.configuration.file.FileConfiguration config) Creates an instance of aConfigReaderSpigotrecord class.- Parameters:
config- the value for theconfigrecord component
-
-
Method Details
-
get
Description copied from interface:IConfigReaderGets the value of a config option at a given path. If unavailable, the default object is returned instead.- Specified by:
getin interfaceIConfigReader- Parameters:
path- The path of the config option to read.fallback- The default value to return if the actual option in the config was unavailable.- Returns:
- The value of the config option if possible, otherwise the default value.
-
getKeys
Description copied from interface:IConfigReaderGets a set containing all keys.- Specified by:
getKeysin interfaceIConfigReader
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
config
public org.bukkit.configuration.file.FileConfiguration config()Returns the value of theconfigrecord component.- Returns:
- the value of the
configrecord component
-