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
Modifier and TypeFieldDescriptionprivate final float
The field for thevalue
record component.Fields inherited from interface net.minecraft.util.ToFloatFunction
IDENTITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfloat
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.mapAll
(CubicSpline.CoordinateVisitor<I> p_211581_) float
maxValue()
float
minValue()
final String
toString()
Returns a string representation of this record class.float
value()
Returns the value of thevalue
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.util.ToFloatFunction
comap
-
Field Details
-
value
private final float valueThe field for thevalue
record component.
-
-
Constructor Details
-
Constant
public Constant(float value) Creates an instance of aConstant
record class.- Parameters:
value
- the value for thevalue
record component
-
-
Method Details
-
apply
- Specified by:
apply
in interfaceToFloatFunction<C>
-
parityString
- Specified by:
parityString
in interfaceCubicSpline<C,
I extends ToFloatFunction<C>>
-
minValue
public float minValue()- Specified by:
minValue
in interfaceToFloatFunction<C>
-
maxValue
public float maxValue()- Specified by:
maxValue
in interfaceToFloatFunction<C>
-
mapAll
- Specified by:
mapAll
in 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 thevalue
record component.- Returns:
- the value of the
value
record component
-