Package net.minecraft.util
Record Class CubicSpline.Constant<C,I extends ToFloatFunction<C>>
java.lang.Object
java.lang.Record
net.minecraft.util.CubicSpline.Constant<C,I>
- All Implemented Interfaces:
CubicSpline<C,,I> ToFloatFunction<C>
- Enclosing interface:
- CubicSpline<C,
I extends ToFloatFunction<C>>
public static record CubicSpline.Constant<C,I extends ToFloatFunction<C>> (float value)
extends Record
implements CubicSpline<C,I>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.util.CubicSpline
CubicSpline.Builder<C,I extends ToFloatFunction<C>>, CubicSpline.Constant<C, I extends ToFloatFunction<C>>, CubicSpline.CoordinateVisitor<I>, CubicSpline.Multipoint<C, I extends ToFloatFunction<C>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final floatThe field for thevaluerecord component.Fields inherited from interface net.minecraft.util.ToFloatFunction
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> p_211581_) floatmaxValue()floatminValue()final StringtoString()Returns a string representation of this record class.floatvalue()Returns the value of thevaluerecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.util.ToFloatFunction
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 interfaceToFloatFunction<C>
-
parityString
- Specified by:
parityStringin interfaceCubicSpline<C,I extends ToFloatFunction<C>>
-
minValue
public float minValue()- Specified by:
minValuein interfaceToFloatFunction<C>
-
maxValue
public float maxValue()- Specified by:
maxValuein interfaceToFloatFunction<C>
-
mapAll
- Specified by:
mapAllin interfaceCubicSpline<C,I extends ToFloatFunction<C>>
-
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. All components in this record class are compared with '=='. -
value
public float value()Returns the value of thevaluerecord component.- Returns:
- the value of the
valuerecord component
-