Record Class OwnedCosmetic

java.lang.Object
java.lang.Record
com.stereowalker.unionlib.supporter.OwnedCosmetic

public record OwnedCosmetic(String cosmeticId, boolean can_color, String[] permitted_variants, Map<String,Color> colors) extends Record
  • Constructor Details

    • OwnedCosmetic

      public OwnedCosmetic(String cosmeticId, boolean can_color, String[] permitted_variants, Map<String,Color> colors)
      Creates an instance of a OwnedCosmetic record class.
      Parameters:
      cosmeticId - the value for the cosmeticId record component
      can_color - the value for the can_color record component
      permitted_variants - the value for the permitted_variants record component
      colors - the value for the colors record component
  • Method Details

    • equals

      public final boolean equals(Object arg0)
      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:
      arg0 - the object with which to compare
      Returns:
      true if this object is the same as the arg0 argument; false otherwise.
    • 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
    • cosmeticId

      public String cosmeticId()
      Returns the value of the cosmeticId record component.
      Returns:
      the value of the cosmeticId record component
    • can_color

      public boolean can_color()
      Returns the value of the can_color record component.
      Returns:
      the value of the can_color record component
    • permitted_variants

      public String[] permitted_variants()
      Returns the value of the permitted_variants record component.
      Returns:
      the value of the permitted_variants record component
    • colors

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