Record Class CubicSpline.Constant<I>
java.lang.Object
java.lang.Record
net.minecraft.util.CubicSpline.Constant<I>
- All Implemented Interfaces:
CubicSpline<I>
- Enclosing interface:
CubicSpline<I>
-
Nested Class Summary
Nested classes/interfaces inherited from interface CubicSpline
CubicSpline.Builder<I>, CubicSpline.Constant<I>, CubicSpline.Multipoint<I> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatThe field for thevaluerecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mapCoordinates(UnaryOperator<I> mapper) floatmaxValue()floatminValue()final StringtoString()Returns a string representation of this record class.floatvalue()Returns the value of thevaluerecord component.
-
Field Details
-
value
private final float valueThe field for thevaluerecord component.
-
-
Constructor Details
-
Constant
public Constant(float value) Creates an instance of aConstantrecord class.- Parameters:
value- the value for thevaluerecord component
-
-
Method Details
-
parityString
- Specified by:
parityStringin interfaceCubicSpline<I>
-
minValue
public float minValue()- Specified by:
minValuein interfaceCubicSpline<I>
-
maxValue
public float maxValue()- Specified by:
maxValuein interfaceCubicSpline<I>
-
mapCoordinates
- Specified by:
mapCoordinatesin interfaceCubicSpline<I>
-
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 with thecomparemethod from their corresponding wrapper classes. -
value
public float value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-