Record Class Palette.Entry
java.lang.Object
java.lang.Record
dev.despical.mazeengine.config.Palette.Entry
- Enclosing class:
Palette
Pairs a portable block-state string with its selection weight.
Palette construction checks positive finite weights and retains a copied entry list. Parsing validates the block state for the palette's role before the entry is used by deterministic block-plan selection.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionblock()Returns the value of theblockrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.doubleweight()Returns the value of theweightrecord component.
-
Constructor Details
-
Entry
Creates an instance of aEntryrecord class.- Parameters:
block- the value for theblockrecord componentweight- the value for theweightrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
block
Returns the value of theblockrecord component.- Returns:
- the value of the
blockrecord component
-
weight
public double weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-