Record Class OwnedCosmetic
java.lang.Object
java.lang.Record
com.stereowalker.unionlib.supporter.OwnedCosmetic
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecan_colorrecord component.colors()Returns the value of thecolorsrecord component.Returns the value of thecosmeticIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.String[]Returns the value of thepermitted_variantsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OwnedCosmetic
public OwnedCosmetic(String cosmeticId, boolean can_color, String[] permitted_variants, Map<String, Color> colors) Creates an instance of aOwnedCosmeticrecord class.- Parameters:
cosmeticId- the value for thecosmeticIdrecord componentcan_color- the value for thecan_colorrecord componentpermitted_variants- the value for thepermitted_variantsrecord componentcolors- the value for thecolorsrecord component
-
-
Method Details
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
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. -
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. -
cosmeticId
Returns the value of thecosmeticIdrecord component.- Returns:
- the value of the
cosmeticIdrecord component
-
can_color
public boolean can_color()Returns the value of thecan_colorrecord component.- Returns:
- the value of the
can_colorrecord component
-
permitted_variants
Returns the value of thepermitted_variantsrecord component.- Returns:
- the value of the
permitted_variantsrecord component
-
colors
Returns the value of thecolorsrecord component.- Returns:
- the value of the
colorsrecord component
-