Package kr.toxicity.model.api.data.raw
Record Class Datapoint
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.Datapoint
- Record Components:
x- xy- yz- zscript- script
@Internal
public record Datapoint(@Nullable com.google.gson.JsonPrimitive x, @Nullable com.google.gson.JsonPrimitive y, @Nullable com.google.gson.JsonPrimitive z, @Nullable String script)
extends Record
A raw JSON vector.
-
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.booleanChecks this datapoint has script@NotNull Stringscript()Gets script@NotNull FloatFunction<org.joml.Vector3f> toFunction(@NotNull ModelLoadContext context) Creates vector functionfinal StringtoString()Returns a string representation of this record class.@Nullable com.google.gson.JsonPrimitivex()Returns the value of thexrecord component.@Nullable com.google.gson.JsonPrimitivey()Returns the value of theyrecord component.@Nullable com.google.gson.JsonPrimitivez()Returns the value of thezrecord component.
-
Constructor Details
-
Datapoint
public Datapoint(@Nullable @Nullable com.google.gson.JsonPrimitive x, @Nullable @Nullable com.google.gson.JsonPrimitive y, @Nullable @Nullable com.google.gson.JsonPrimitive z, @Nullable @Nullable String script) Creates an instance of aDatapointrecord class.
-
-
Method Details
-
hasScript
public boolean hasScript()Checks this datapoint has script- Returns:
- has script
-
script
Gets script- Returns:
- script
-
toFunction
@NotNull public @NotNull FloatFunction<org.joml.Vector3f> toFunction(@NotNull @NotNull ModelLoadContext context) Creates vector function- Parameters:
context- context- Returns:
- vector function
-
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 withObjects::equals(Object,Object). -
x
@Nullable public @Nullable com.google.gson.JsonPrimitive x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
@Nullable public @Nullable com.google.gson.JsonPrimitive y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
z
@Nullable public @Nullable com.google.gson.JsonPrimitive z()Returns the value of thezrecord component.- Returns:
- the value of the
zrecord component
-