Record Class FishProperties.Star

java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.registry.FishProperties.Star
Enclosing class:
FishProperties

public static record FishProperties.Star(String name, int x, int y, List<String> connections, int debugColor) extends Record
  • Field Details

  • Constructor Details

    • Star

      public Star(String name, int x, int y, List<String> connections, int debugColor)
      Creates an instance of a Star record class.
      Parameters:
      name - the value for the name record component
      x - the value for the x record component
      y - the value for the y record component
      connections - the value for the connections record component
      debugColor - the value for the debugColor record component
  • Method Details

    • fromRaAndDec

      public static FishProperties.Star fromRaAndDec(String name, int degrees, float dec, int color, String... connections)
    • transform

      public static float transform(float v)
    • fromRaAndDec

      public static FishProperties.Star fromRaAndDec(String name, int hours, int minutes, double seconds, float dec, int color, String... connections)
    • 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 the compare method from their corresponding wrapper classes.
      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

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • x

      public int x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • y

      public int y()
      Returns the value of the y record component.
      Returns:
      the value of the y record component
    • connections

      public List<String> connections()
      Returns the value of the connections record component.
      Returns:
      the value of the connections record component
    • debugColor

      public int debugColor()
      Returns the value of the debugColor record component.
      Returns:
      the value of the debugColor record component