Record Class CubicSpline.Constant<C, I extends BoundedFloatFunction<C>>
java.lang.Object
java.lang.Record
net.minecraft.util.CubicSpline.Constant<C,I>
- All Implemented Interfaces:
BoundedFloatFunction<C>, CubicSpline<C,I>
- Enclosing interface:
CubicSpline<C, I extends BoundedFloatFunction<C>>
public static record CubicSpline.Constant<C, I extends BoundedFloatFunction<C>>(float value)
extends Record
implements CubicSpline<C,I>
-
Nested Class Summary
Nested classes/interfaces inherited from interface CubicSpline
CubicSpline.Builder<C,I>, CubicSpline.Constant<C, I>, CubicSpline.CoordinateVisitor<I>, CubicSpline.Multipoint<C, I> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatThe field for thevaluerecord component.Fields inherited from interface BoundedFloatFunction
IDENTITY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.mapAll(CubicSpline.CoordinateVisitor<I> visitor) floatmaxValue()floatminValue()final StringtoString()Returns a string representation of this record class.floatvalue()Returns the value of thevaluerecord component.Methods inherited from interface BoundedFloatFunction
comap
-
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
-
apply
- Specified by:
applyin interfaceBoundedFloatFunction<C>
-
parityString
- Specified by:
parityStringin interfaceCubicSpline<C, I extends BoundedFloatFunction<C>>
-
minValue
public float minValue()- Specified by:
minValuein interfaceBoundedFloatFunction<C>
-
maxValue
public float maxValue()- Specified by:
maxValuein interfaceBoundedFloatFunction<C>
-
mapAll
- Specified by:
mapAllin interfaceCubicSpline<C, I extends BoundedFloatFunction<C>>
-
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
-