Package com.wdiscute.echoes.upgrades
Record Class BlacksmithTrade.Entry
java.lang.Object
java.lang.Record
com.wdiscute.echoes.upgrades.BlacksmithTrade.Entry
- Enclosing class:
BlacksmithTrade
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<BlacksmithTrade.Entry> static final BlacksmithTrade.Entry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<com.wdiscute.utils.MaybeStack> cost()Returns the value of thecostrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.com.wdiscute.utils.MaybeStackitem()Returns the value of theitemrecord component.rarity()Returns the value of therarityrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
-
CODEC
-
-
Constructor Details
-
Entry
public Entry(Rarity rarity, com.wdiscute.utils.MaybeStack item, List<com.wdiscute.utils.MaybeStack> cost) Creates an instance of aEntryrecord class.- Parameters:
rarity- the value for therarityrecord componentitem- the value for theitemrecord componentcost- the value for thecostrecord component
-
-
Method Details
-
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. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
rarity
Returns the value of therarityrecord component.- Returns:
- the value of the
rarityrecord component
-
item
public com.wdiscute.utils.MaybeStack item()Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-
cost
Returns the value of thecostrecord component.- Returns:
- the value of the
costrecord component
-