Record Class ServerSettingsImpl
java.lang.Object
java.lang.Record
com.soulfiremc.server.settings.lib.ServerSettingsImpl
- All Implemented Interfaces:
ServerSettingsSource
,SettingsSource
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.soulfiremc.server.settings.lib.SettingsSource
SettingsSource.CustomIntSupplier
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionServerSettingsImpl
(Map<String, Map<String, com.google.gson.JsonElement>> settings) Creates an instance of aServerSettingsImpl
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerSettingsImpl
deserialize
(com.google.gson.JsonElement json) final boolean
Indicates whether some other object is "equal to" this one.static ServerSettingsImpl
fromProto
(ServerConfig request) Optional
<com.google.gson.JsonElement> final int
hashCode()
Returns a hash code value for this object.com.google.gson.JsonObject
settings()
Returns the value of thesettings
record component.toProto()
final String
toString()
Returns a string representation of this record class.@NotNull ServerSettingsImpl
withSettings
(Map<String, Map<String, com.google.gson.JsonElement>> settings)
-
Field Details
-
EMPTY
-
-
Constructor Details
-
ServerSettingsImpl
Creates an instance of aServerSettingsImpl
record class.- Parameters:
settings
- the value for thesettings
record component
-
-
Method Details
-
deserialize
-
fromProto
-
serializeToTree
public com.google.gson.JsonObject serializeToTree() -
toProto
-
get
- Specified by:
get
in interfaceSettingsSource
-
withSettings
@NotNull public @NotNull ServerSettingsImpl withSettings(Map<String, Map<String, com.google.gson.JsonElement>> settings) - Returns:
this
.
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
settings
Returns the value of thesettings
record component.- Returns:
- the value of the
settings
record component
-