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 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 aInstanceSettingsImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaccounts()Returns the value of theaccountsrecord component.static InstanceSettingsImpldeserialize(com.google.gson.JsonElement json) final booleanIndicates whether some other object is "equal to" this one.static InstanceSettingsImplfromProto(InstanceConfig request) Optional<com.google.gson.JsonElement> final inthashCode()Returns a hash code value for this object.proxies()Returns the value of theproxiesrecord component.com.google.gson.JsonObjectsettings()Returns the value of thesettingsrecord component.toProto()final StringtoString()Returns a string representation of this record class.@NotNull InstanceSettingsImplwithAccounts(List<MinecraftAccount> accounts) @NotNull InstanceSettingsImplwithProxies(List<SFProxy> proxies) @NotNull InstanceSettingsImplwithSettings(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 aInstanceSettingsImplrecord class.- Parameters:
settings- the value for thesettingsrecord componentaccounts- the value for theaccountsrecord componentproxies- the value for theproxiesrecord component
-
-
Method Details
-
deserialize
-
fromProto
-
serializeToTree
public com.google.gson.JsonObject serializeToTree() -
toProto
-
get
- Specified by:
getin 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
-
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). -
settings
-
accounts
Returns the value of theaccountsrecord component.- Specified by:
accountsin interfaceInstanceSettingsSource- Returns:
- the value of the
accountsrecord component
-
proxies
Returns the value of theproxiesrecord component.- Specified by:
proxiesin interfaceInstanceSettingsSource- Returns:
- the value of the
proxiesrecord component
-