Package net.minecraft.client
Record Class OptionInstance.ClampingLazyMaxIntRange
java.lang.Object
java.lang.Record
net.minecraft.client.OptionInstance.ClampingLazyMaxIntRange
- All Implemented Interfaces:
OptionInstance.CycleableValueSet<Integer>
,OptionInstance.IntRangeBase
,OptionInstance.SliderableOrCyclableValueSet<Integer>
,OptionInstance.SliderableValueSet<Integer>
,OptionInstance.ValueSet<Integer>
- Enclosing class:
- OptionInstance<T>
public static record OptionInstance.ClampingLazyMaxIntRange(int minInclusive, IntSupplier maxSupplier, int encodableMaxInclusive)
extends Record
implements OptionInstance.IntRangeBase, OptionInstance.SliderableOrCyclableValueSet<Integer>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.OptionInstance.CycleableValueSet
OptionInstance.CycleableValueSet.ValueSetter<T>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
The field for theencodableMaxInclusive
record component.private final IntSupplier
The field for themaxSupplier
record component.private final int
The field for theminInclusive
record component. -
Constructor Summary
ConstructorDescriptionClampingLazyMaxIntRange
(int minInclusive, IntSupplier maxSupplier, int encodableMaxInclusive) Creates an instance of aClampingLazyMaxIntRange
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<Integer>
codec()
boolean
int
Returns the value of theencodableMaxInclusive
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
Returns the value of themaxSupplier
record component.int
Returns the value of theminInclusive
record component.final String
toString()
Returns a string representation of this record class.validateValue
(Integer p_231590_) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.client.OptionInstance.CycleableValueSet
valueSetter
Methods inherited from interface net.minecraft.client.OptionInstance.IntRangeBase
fromSliderValue, toSliderValue, xmap
Methods inherited from interface net.minecraft.client.OptionInstance.SliderableOrCyclableValueSet
createButton
Methods inherited from interface net.minecraft.client.OptionInstance.SliderableValueSet
createButton
-
Field Details
-
minInclusive
private final int minInclusiveThe field for theminInclusive
record component. -
maxSupplier
The field for themaxSupplier
record component. -
encodableMaxInclusive
private final int encodableMaxInclusiveThe field for theencodableMaxInclusive
record component.
-
-
Constructor Details
-
ClampingLazyMaxIntRange
public ClampingLazyMaxIntRange(int minInclusive, IntSupplier maxSupplier, int encodableMaxInclusive) Creates an instance of aClampingLazyMaxIntRange
record class.- Parameters:
minInclusive
- the value for theminInclusive
record componentmaxSupplier
- the value for themaxSupplier
record componentencodableMaxInclusive
- the value for theencodableMaxInclusive
record component
-
-
Method Details
-
validateValue
- Specified by:
validateValue
in interfaceOptionInstance.ValueSet<Integer>
-
maxInclusive
public int maxInclusive()- Specified by:
maxInclusive
in interfaceOptionInstance.IntRangeBase
-
codec
- Specified by:
codec
in interfaceOptionInstance.ValueSet<Integer>
-
createCycleButton
public boolean createCycleButton()- Specified by:
createCycleButton
in interfaceOptionInstance.SliderableOrCyclableValueSet<Integer>
-
valueListSupplier
- Specified by:
valueListSupplier
in interfaceOptionInstance.CycleableValueSet<Integer>
-
minInclusive
public int minInclusive()Returns the value of theminInclusive
record component.- Specified by:
minInclusive
in interfaceOptionInstance.IntRangeBase
- Returns:
- the value of the
minInclusive
record component
-
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 '=='. -
maxSupplier
Returns the value of themaxSupplier
record component.- Returns:
- the value of the
maxSupplier
record component
-
encodableMaxInclusive
public int encodableMaxInclusive()Returns the value of theencodableMaxInclusive
record component.- Returns:
- the value of the
encodableMaxInclusive
record component
-