Package net.minecraft.util
Record Class InclusiveRange<T extends Comparable<T>>
java.lang.Object
java.lang.Record
net.minecraft.util.InclusiveRange<T>
public record InclusiveRange<T extends Comparable<T>>(T extends Comparable<T> minInclusive, T extends Comparable<T> maxInclusive)
extends Record
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<InclusiveRange<Integer>>private final TThe field for themaxInclusiverecord component.private final TThe field for theminInclusiverecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionInclusiveRange(T p_300479_) InclusiveRange(T minInclusive, T maxInclusive) Creates an instance of aInclusiveRangerecord class.
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T extends Comparable<T>>
 com.mojang.serialization.Codec<InclusiveRange<T>>codec(com.mojang.serialization.Codec<T> p_184573_) static <T extends Comparable<T>>
 com.mojang.serialization.Codec<InclusiveRange<T>>codec(com.mojang.serialization.Codec<T> p_184575_, T p_184576_, T p_184577_) booleancontains(InclusiveRange<T> p_184571_) static <T extends Comparable<T>>
 com.mojang.serialization.DataResult<InclusiveRange<T>>create(T p_184581_, T p_184582_) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisValueInRange(T p_184579_) Returns the value of themaxInclusiverecord component.Returns the value of theminInclusiverecord component.toString()Returns a string representation of this record class.
- 
Field Details- 
minInclusiveThe field for theminInclusiverecord component.
- 
maxInclusiveThe field for themaxInclusiverecord component.
- 
INT
 
- 
- 
Constructor Details- 
InclusiveRangeCreates an instance of aInclusiveRangerecord class.- Parameters:
- minInclusive- the value for the- minInclusiverecord component
- maxInclusive- the value for the- maxInclusiverecord component
 
- 
InclusiveRange
 
- 
- 
Method Details- 
codecpublic static <T extends Comparable<T>> com.mojang.serialization.Codec<InclusiveRange<T>> codec(com.mojang.serialization.Codec<T> p_184573_) 
- 
codecpublic static <T extends Comparable<T>> com.mojang.serialization.Codec<InclusiveRange<T>> codec(com.mojang.serialization.Codec<T> p_184575_, T p_184576_, T p_184577_) 
- 
createpublic static <T extends Comparable<T>> com.mojang.serialization.DataResult<InclusiveRange<T>> create(T p_184581_, T p_184582_) 
- 
isValueInRange
- 
contains
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
minInclusiveReturns the value of theminInclusiverecord component.- Returns:
- the value of the minInclusiverecord component
 
- 
maxInclusiveReturns the value of themaxInclusiverecord component.- Returns:
- the value of the maxInclusiverecord component
 
 
-