Record Class InstanceSettingsImpl
java.lang.Object
java.lang.Record
com.soulfiremc.server.settings.lib.InstanceSettingsImpl
- All Implemented Interfaces:
InstanceSettingsSource
,SettingsSource
public record InstanceSettingsImpl(Map<String,Map<String,com.google.gson.JsonElement>> settings, List<MinecraftAccount> accounts, List<SFProxy> proxies)
extends Record
implements InstanceSettingsSource
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.soulfiremc.server.settings.lib.SettingsSource
SettingsSource.CustomIntSupplier
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInstanceSettingsImpl
(Map<String, Map<String, com.google.gson.JsonElement>> settings, List<MinecraftAccount> accounts, List<SFProxy> proxies) Creates an instance of aInstanceSettingsImpl
record class. -
Method Summary
Modifier and TypeMethodDescriptionaccounts()
Returns the value of theaccounts
record component.static InstanceSettingsImpl
deserialize
(com.google.gson.JsonElement json) final boolean
Indicates whether some other object is "equal to" this one.static InstanceSettingsImpl
fromProto
(InstanceConfig request) Optional
<com.google.gson.JsonElement> final int
hashCode()
Returns a hash code value for this object.proxies()
Returns the value of theproxies
record component.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 InstanceSettingsImpl
withAccounts
(List<MinecraftAccount> accounts) @NotNull InstanceSettingsImpl
withProxies
(List<SFProxy> proxies) @NotNull InstanceSettingsImpl
withSettings
(Map<String, Map<String, com.google.gson.JsonElement>> settings)
-
Field Details
-
EMPTY
-
-
Constructor Details
-
InstanceSettingsImpl
public InstanceSettingsImpl(Map<String, Map<String, com.google.gson.JsonElement>> settings, List<MinecraftAccount> accounts, List<SFProxy> proxies) Creates an instance of aInstanceSettingsImpl
record class.- Parameters:
settings
- the value for thesettings
record componentaccounts
- the value for theaccounts
record componentproxies
- the value for theproxies
record component
-
-
Method Details
-
deserialize
-
fromProto
-
serializeToTree
public com.google.gson.JsonObject serializeToTree() -
toProto
-
get
- Specified by:
get
in interfaceSettingsSource
-
withSettings
@NotNull public @NotNull InstanceSettingsImpl withSettings(Map<String, Map<String, com.google.gson.JsonElement>> settings) - Returns:
this
.
-
withAccounts
- Returns:
this
.
-
withProxies
- 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
-
accounts
Returns the value of theaccounts
record component.- Specified by:
accounts
in interfaceInstanceSettingsSource
- Returns:
- the value of the
accounts
record component
-
proxies
Returns the value of theproxies
record component.- Specified by:
proxies
in interfaceInstanceSettingsSource
- Returns:
- the value of the
proxies
record component
-