Record Class Float4

java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.Float4
Record Components:
dx - from-x
dz - from-z
tx - to-x
tz - to-z

@Internal public record Float4(float dx, float dz, float tx, float tz) extends Record
A four float values (uv)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.google.gson.JsonDeserializer<Float4>
    Parser
  • Constructor Summary

    Constructors
    Constructor
    Description
    Float4(float dx, float dz, float tx, float tz)
    Creates an instance of a Float4 record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Float4
    div(float width, float height)
    Divides floats by width, height
    @NotNull Float4
    div(@NotNull ModelResolution resolution)
    Divides floats by resolution.
    float
    dx()
    Returns the value of the dx record component.
    float
    dz()
    Returns the value of the dz record component.
    boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns a hash code value for this object.
    @NotNull com.google.gson.JsonArray
    Converts floats to JSON array.
    @NotNull String
    Returns a string representation of this record class.
    float
    tx()
    Returns the value of the tx record component.
    float
    tz()
    Returns the value of the tz record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • PARSER

      public static final com.google.gson.JsonDeserializer<Float4> PARSER
      Parser
  • Constructor Details

    • Float4

      public Float4(float dx, float dz, float tx, float tz)
      Creates an instance of a Float4 record class.
      Parameters:
      dx - the value for the dx record component
      dz - the value for the dz record component
      tx - the value for the tx record component
      tz - the value for the tz record component
  • Method Details

    • div

      @NotNull public @NotNull Float4 div(@NotNull @NotNull ModelResolution resolution)
      Divides floats by resolution.
      Parameters:
      resolution - model resolution
      Returns:
      new floats
    • div

      @NotNull public @NotNull Float4 div(float width, float height)
      Divides floats by width, height
      Parameters:
      width - width
      height - height
      Returns:
      new floats
    • toJson

      @NotNull public @NotNull com.google.gson.JsonArray toJson()
      Converts floats to JSON array.
      Returns:
      json array
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public boolean equals(Object obj)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      obj - the object with which to compare
      Returns:
      true if this object is the same as the obj argument; false otherwise.
    • toString

      @NotNull public @NotNull String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • dx

      public float dx()
      Returns the value of the dx record component.
      Returns:
      the value of the dx record component
    • dz

      public float dz()
      Returns the value of the dz record component.
      Returns:
      the value of the dz record component
    • tx

      public float tx()
      Returns the value of the tx record component.
      Returns:
      the value of the tx record component
    • tz

      public float tz()
      Returns the value of the tz record component.
      Returns:
      the value of the tz record component