Record Class AgingOutcomeContext

java.lang.Object
java.lang.Record
ke.ric.api.aging.AgingOutcomeContext

public record AgingOutcomeContext(org.bukkit.inventory.ItemStack source, AgingExposure exposure, AgingClimate currentClimate, Set<String> activeExposureKeys) extends Record
Read-only source and exposure evidence supplied to a dynamic outcome resolver.
  • Constructor Details

    • AgingOutcomeContext

      public AgingOutcomeContext(org.bukkit.inventory.ItemStack source, AgingExposure exposure, AgingClimate currentClimate)
      Compatibility constructor for outcomes not inspecting the current environment.
    • AgingOutcomeContext

      public AgingOutcomeContext(org.bukkit.inventory.ItemStack source, AgingExposure exposure, AgingClimate currentClimate, Set<String> activeExposureKeys)
      Creates an instance of a AgingOutcomeContext record class.
      Parameters:
      source - the value for the source record component
      exposure - the value for the exposure record component
      currentClimate - the value for the currentClimate record component
      activeExposureKeys - the value for the activeExposureKeys record component
  • Method Details

    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • source

      public org.bukkit.inventory.ItemStack source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • exposure

      public AgingExposure exposure()
      Returns the value of the exposure record component.
      Returns:
      the value of the exposure record component
    • currentClimate

      public AgingClimate currentClimate()
      Returns the value of the currentClimate record component.
      Returns:
      the value of the currentClimate record component
    • activeExposureKeys

      public Set<String> activeExposureKeys()
      Returns the value of the activeExposureKeys record component.
      Returns:
      the value of the activeExposureKeys record component