Record Class PaletteEntries.Entry

java.lang.Object
java.lang.Record
com.iizigo.prop.editor.color.swt.PaletteEntries.Entry
Record Components:
kind - "group" for a non-selectable header, "role", "color" or "member".
label - The text shown.
ref - The reference the entry stands for, null for a group.
light - The ARGB the entry resolves to in the light scheme.
lightResolved - true when the light value resolved.
dark - The ARGB the entry resolves to in the dark scheme.
darkResolved - true when the dark value resolved.
Enclosing class:
PaletteEntries

public static record PaletteEntries.Entry(String kind, String label, String ref, int light, boolean lightResolved, int dark, boolean darkResolved) extends Record
One entry of the list.
Author:
Christopher Mindus
  • Constructor Summary

    Constructors
    Constructor
    Description
    Entry(String kind, String label, String ref, int light, boolean lightResolved, int dark, boolean darkResolved)
    Creates an instance of a Entry record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the dark record component.
    boolean
    Returns the value of the darkResolved record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Checks if the entry can be chosen.
    Returns the value of the kind record component.
    Returns the value of the label record component.
    int
    Returns the value of the light record component.
    boolean
    Returns the value of the lightResolved record component.
    int
    literal(boolean dark)
    Gets the literal of a scheme, the magenta marker for an unresolved value.
    ref()
    Returns the value of the ref record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

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

    • Entry

      public Entry(String kind, String label, String ref, int light, boolean lightResolved, int dark, boolean darkResolved)
      Creates an instance of a Entry record class.
      Parameters:
      kind - the value for the kind record component
      label - the value for the label record component
      ref - the value for the ref record component
      light - the value for the light record component
      lightResolved - the value for the lightResolved record component
      dark - the value for the dark record component
      darkResolved - the value for the darkResolved record component
  • Method Details

    • isSelectable

      public boolean isSelectable()
      Checks if the entry can be chosen.
    • literal

      public int literal(boolean dark)
      Gets the literal of a scheme, the magenta marker for an unresolved value.
      Parameters:
      dark - true for the dark scheme.
    • 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.
    • kind

      public String kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • label

      public String label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • ref

      public String ref()
      Returns the value of the ref record component.
      Returns:
      the value of the ref record component
    • light

      public int light()
      Returns the value of the light record component.
      Returns:
      the value of the light record component
    • lightResolved

      public boolean lightResolved()
      Returns the value of the lightResolved record component.
      Returns:
      the value of the lightResolved record component
    • dark

      public int dark()
      Returns the value of the dark record component.
      Returns:
      the value of the dark record component
    • darkResolved

      public boolean darkResolved()
      Returns the value of the darkResolved record component.
      Returns:
      the value of the darkResolved record component