Record Class PWAIcons.Sources

java.lang.Object
java.lang.Record
com.iizix.pwa.PWAIcons.Sources
Record Components:
master - The PNG bytes of the master icon (square, at least 512), null for none: then nothing is generated and only the folder's, the named and the iiziRun files are served.
maskable - The bytes of the image named as the maskable icon, null for none.
monochrome - The bytes of the image named as the monochrome icon, null for none.
apple - The bytes of the image named as the Apple icon, null for none.
assets - The module's asset files by path relative to the assets directory with '/' separators (PWA/icons/512.png, iiziRun/icons/ios/180.png), those under PWAIcons.FOLDER and PWAIcons.IIZIRUN_ICONS at least; null for none.
fallback - The App's background for the maskable and Apple icons when an image has no edge colour (PWAIcons.getBackground(ModuleApp)), null for the default.
Enclosing class:
PWAIcons

public static record PWAIcons.Sources(byte[] master, byte[] maskable, byte[] monochrome, byte[] apple, Map<String,byte[]> assets, Color fallback) extends Record
What the icons are built from.
Author:
Christopher Mindus
  • Constructor Details

    • Sources

      public Sources(byte[] master, byte[] maskable, byte[] monochrome, byte[] apple, Map<String,byte[]> assets, Color fallback)
      Creates an instance of a Sources record class.
      Parameters:
      master - the value for the master record component
      maskable - the value for the maskable record component
      monochrome - the value for the monochrome record component
      apple - the value for the apple record component
      assets - the value for the assets record component
      fallback - the value for the fallback record component
  • Method Details

    • 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.
    • master

      public byte[] master()
      Returns the value of the master record component.
      Returns:
      the value of the master record component
    • maskable

      public byte[] maskable()
      Returns the value of the maskable record component.
      Returns:
      the value of the maskable record component
    • monochrome

      public byte[] monochrome()
      Returns the value of the monochrome record component.
      Returns:
      the value of the monochrome record component
    • apple

      public byte[] apple()
      Returns the value of the apple record component.
      Returns:
      the value of the apple record component
    • assets

      public Map<String,byte[]> assets()
      Returns the value of the assets record component.
      Returns:
      the value of the assets record component
    • fallback

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