Record Class ColorMap.Color

java.lang.Object
java.lang.Record
dev.cerus.maps.api.colormap.ColorMap.Color
Enclosing class:
ColorMap

public static record ColorMap.Color(byte mapColor, Color javaColor) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    Color​(byte mapColor, Color javaColor)
    Creates an instance of a Color record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals​(Object o)
    Indicates whether some other object is "equal to" this one.
    int
    Returns a hash code value for this object.
    Returns the value of the javaColor record component.
    byte
    Returns the value of the mapColor record component.
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    • Color

      public Color(byte mapColor, Color javaColor)
      Creates an instance of a Color record class.
      Parameters:
      mapColor - the value for the mapColor record component
      javaColor - the value for the javaColor record component
  • Method Details

    • equals

      public 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.
    • 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
    • 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
    • mapColor

      public byte mapColor()
      Returns the value of the mapColor record component.
      Returns:
      the value of the mapColor record component
    • javaColor

      public Color javaColor()
      Returns the value of the javaColor record component.
      Returns:
      the value of the javaColor record component