Record Class CachedWayPoint

java.lang.Object
java.lang.Record
dev.gothickit.zenkit.way.CachedWayPoint
All Implemented Interfaces:
CacheableObject<CachedWayPoint>, WayPoint

public record CachedWayPoint(@NotNull String name, int waterDepth, boolean underWater, @NotNull Vec3f position, @NotNull Vec3f direction, boolean freePoint) extends Record implements WayPoint
  • Constructor Summary

    Constructors
    Constructor
    Description
    CachedWayPoint(@NotNull String name, int waterDepth, boolean underWater, @NotNull Vec3f position, @NotNull Vec3f direction, boolean freePoint)
    Creates an instance of a CachedWayPoint record class.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    @NotNull Vec3f
    Returns the value of the direction record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the freePoint record component.
    final int
    Returns a hash code value for this object.
    boolean
     
    @NotNull String
    Returns the value of the name record component.
    @NotNull Vec3f
    Returns the value of the position record component.
    final String
    Returns a string representation of this record class.
    boolean
    Returns the value of the underWater record component.
    int
    Returns the value of the waterDepth record component.

    Methods inherited from class java.lang.Object

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

    • CachedWayPoint

      public CachedWayPoint(@NotNull @NotNull String name, int waterDepth, boolean underWater, @NotNull @NotNull Vec3f position, @NotNull @NotNull Vec3f direction, boolean freePoint)
      Creates an instance of a CachedWayPoint record class.
      Parameters:
      name - the value for the name record component
      waterDepth - the value for the waterDepth record component
      underWater - the value for the underWater record component
      position - the value for the position record component
      direction - the value for the direction record component
      freePoint - the value for the freePoint record component
  • Method Details

    • cache

      @NotNull public @NotNull CachedWayPoint cache()
      Specified by:
      cache in interface CacheableObject<CachedWayPoint>
    • isCached

      public boolean isCached()
      Specified by:
      isCached in interface CacheableObject<CachedWayPoint>
    • toString

      public final 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
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • name

      @NotNull public @NotNull String name()
      Returns the value of the name record component.
      Specified by:
      name in interface WayPoint
      Returns:
      the value of the name record component
    • waterDepth

      public int waterDepth()
      Returns the value of the waterDepth record component.
      Specified by:
      waterDepth in interface WayPoint
      Returns:
      the value of the waterDepth record component
    • underWater

      public boolean underWater()
      Returns the value of the underWater record component.
      Specified by:
      underWater in interface WayPoint
      Returns:
      the value of the underWater record component
    • position

      @NotNull public @NotNull Vec3f position()
      Returns the value of the position record component.
      Specified by:
      position in interface WayPoint
      Returns:
      the value of the position record component
    • direction

      @NotNull public @NotNull Vec3f direction()
      Returns the value of the direction record component.
      Specified by:
      direction in interface WayPoint
      Returns:
      the value of the direction record component
    • freePoint

      public boolean freePoint()
      Returns the value of the freePoint record component.
      Specified by:
      freePoint in interface WayPoint
      Returns:
      the value of the freePoint record component