Package dev.itsharshxd.zentrix.api.loot
Record Class LootGenerationResult
java.lang.Object
java.lang.Record
dev.itsharshxd.zentrix.api.loot.LootGenerationResult
public record LootGenerationResult(int targetAppearances, @NotNull List<LootPlacement> placements, @NotNull Map<String,Integer> unplacedRequiredAppearances, @NotNull Set<String> spaceLimitedEntries, @NotNull Set<String> failedEntries, int unfilledTarget, @NotNull LootValidationResult validation)
extends Record
Immutable output from real or simulated loot generation.
-
Constructor Summary
ConstructorsConstructorDescriptionLootGenerationResult(int targetAppearances, @NotNull List<LootPlacement> placements, @NotNull Map<String, Integer> unplacedRequiredAppearances, @NotNull Set<String> spaceLimitedEntries, @NotNull Set<String> failedEntries, int unfilledTarget, @NotNull LootValidationResult validation) Creates an instance of aLootGenerationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefailedEntriesrecord component.booleanfinal inthashCode()Returns a hash code value for this object.@NotNull List<LootPlacement> Returns the value of theplacementsrecord component.Returns the value of thespaceLimitedEntriesrecord component.intReturns the value of thetargetAppearancesrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theunfilledTargetrecord component.Returns the value of theunplacedRequiredAppearancesrecord component.@NotNull LootValidationResultReturns the value of thevalidationrecord component.
-
Constructor Details
-
LootGenerationResult
public LootGenerationResult(int targetAppearances, @NotNull @NotNull List<LootPlacement> placements, @NotNull @NotNull Map<String, Integer> unplacedRequiredAppearances, @NotNull @NotNull Set<String> spaceLimitedEntries, @NotNull @NotNull Set<String> failedEntries, int unfilledTarget, @NotNull @NotNull LootValidationResult validation) Creates an instance of aLootGenerationResultrecord class.- Parameters:
targetAppearances- the value for thetargetAppearancesrecord componentplacements- the value for theplacementsrecord componentunplacedRequiredAppearances- the value for theunplacedRequiredAppearancesrecord componentspaceLimitedEntries- the value for thespaceLimitedEntriesrecord componentfailedEntries- the value for thefailedEntriesrecord componentunfilledTarget- the value for theunfilledTargetrecord componentvalidation- the value for thevalidationrecord component
-
-
Method Details
-
generatedAnything
public boolean generatedAnything() -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
targetAppearances
public int targetAppearances()Returns the value of thetargetAppearancesrecord component.- Returns:
- the value of the
targetAppearancesrecord component
-
placements
Returns the value of theplacementsrecord component.- Returns:
- the value of the
placementsrecord component
-
unplacedRequiredAppearances
Returns the value of theunplacedRequiredAppearancesrecord component.- Returns:
- the value of the
unplacedRequiredAppearancesrecord component
-
spaceLimitedEntries
Returns the value of thespaceLimitedEntriesrecord component.- Returns:
- the value of the
spaceLimitedEntriesrecord component
-
failedEntries
Returns the value of thefailedEntriesrecord component.- Returns:
- the value of the
failedEntriesrecord component
-
unfilledTarget
public int unfilledTarget()Returns the value of theunfilledTargetrecord component.- Returns:
- the value of the
unfilledTargetrecord component
-
validation
Returns the value of thevalidationrecord component.- Returns:
- the value of the
validationrecord component
-