Record Class ShadingToggle
java.lang.Object
java.lang.Record
io.github.startsmercury.simply_no_shading.impl.client.ShadingToggle
public record ShadingToggle(String name, boolean defaultValue, KeyMapping keyMapping, ReloadType reloadType)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionShadingToggle(String name, boolean defaultValue, KeyMapping keyMapping, ReloadType reloadType) Creates an instance of aShadingTogglerecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thedefaultValuerecord component.final booleanIndicates whether some other object is "equal to" this one.booleangetFrom(ConfigImpl config) final inthashCode()Returns a hash code value for this object.Returns the value of thekeyMappingrecord component.name()Returns the value of thenamerecord component.Returns the value of thereloadTyperecord component.voidsetTo(ConfigImpl config, boolean value) final StringtoString()Returns a string representation of this record class.tryToggleOnKeyRelease(ConfigImpl config)
-
Constructor Details
-
ShadingToggle
public ShadingToggle(String name, boolean defaultValue, KeyMapping keyMapping, ReloadType reloadType) Creates an instance of aShadingTogglerecord class.- Parameters:
name- the value for thenamerecord componentdefaultValue- the value for thedefaultValuerecord componentkeyMapping- the value for thekeyMappingrecord componentreloadType- the value for thereloadTyperecord component
-
-
Method Details
-
getFrom
-
setTo
-
tryToggleOnKeyRelease
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
defaultValue
public boolean defaultValue()Returns the value of thedefaultValuerecord component.- Returns:
- the value of the
defaultValuerecord component
-
keyMapping
Returns the value of thekeyMappingrecord component.- Returns:
- the value of the
keyMappingrecord component
-
reloadType
Returns the value of thereloadTyperecord component.- Returns:
- the value of the
reloadTyperecord component
-