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 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 a LootGenerationResult record class.
      Parameters:
      targetAppearances - the value for the targetAppearances record component
      placements - the value for the placements record component
      unplacedRequiredAppearances - the value for the unplacedRequiredAppearances record component
      spaceLimitedEntries - the value for the spaceLimitedEntries record component
      failedEntries - the value for the failedEntries record component
      unfilledTarget - the value for the unfilledTarget record component
      validation - the value for the validation record component
  • Method Details

    • generatedAnything

      public boolean generatedAnything()
    • 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
    • equals

      public final boolean equals(Object o)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • targetAppearances

      public int targetAppearances()
      Returns the value of the targetAppearances record component.
      Returns:
      the value of the targetAppearances record component
    • placements

      @NotNull public @NotNull List<LootPlacement> placements()
      Returns the value of the placements record component.
      Returns:
      the value of the placements record component
    • unplacedRequiredAppearances

      @NotNull public @NotNull Map<String,Integer> unplacedRequiredAppearances()
      Returns the value of the unplacedRequiredAppearances record component.
      Returns:
      the value of the unplacedRequiredAppearances record component
    • spaceLimitedEntries

      @NotNull public @NotNull Set<String> spaceLimitedEntries()
      Returns the value of the spaceLimitedEntries record component.
      Returns:
      the value of the spaceLimitedEntries record component
    • failedEntries

      @NotNull public @NotNull Set<String> failedEntries()
      Returns the value of the failedEntries record component.
      Returns:
      the value of the failedEntries record component
    • unfilledTarget

      public int unfilledTarget()
      Returns the value of the unfilledTarget record component.
      Returns:
      the value of the unfilledTarget record component
    • validation

      @NotNull public @NotNull LootValidationResult validation()
      Returns the value of the validation record component.
      Returns:
      the value of the validation record component