Record Class ThemeSheetPalette.Sheet

java.lang.Object
java.lang.Record
com.iizix.prop.ThemeSheetPalette.Sheet
Record Components:
members - The members by <family>/<mode>, each unmodifiable.
Enclosing class:
ThemeSheetPalette

public static record ThemeSheetPalette.Sheet(Map<String, Map<String,String>> members) extends Record
The family members of the sheet: for every block :root[data-iz-scheme="<family>"][data-iz-mode="<mode>"], its declarations as the sheet writes them, custom property (or color-scheme) to value text, in sheet order.
Author:
Christopher Mindus
  • Constructor Details

    • Sheet

      public Sheet(Map<String, Map<String,String>> members)
      Creates an instance of a Sheet record class.
      Parameters:
      members - the value for the members record component
  • Method Details

    • member

      public Map<String,String> member(String family, String mode)
      Gets a member.
      Parameters:
      family - The family name.
      mode - The mode, light or dark.
      Returns:
      The declarations, unmodifiable, or null when the sheet has no such block.
    • families

      public Set<String> families()
      Gets the family names, in sheet order.
      Returns:
      The names, unmodifiable.
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • members

      public Map<String, Map<String,String>> members()
      Returns the value of the members record component.
      Returns:
      the value of the members record component