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 Summary
ConstructorsConstructorDescriptionAgingOutcomeContext(org.bukkit.inventory.ItemStack source, AgingExposure exposure, AgingClimate currentClimate) Compatibility constructor for outcomes not inspecting the current environment.AgingOutcomeContext(org.bukkit.inventory.ItemStack source, AgingExposure exposure, AgingClimate currentClimate, Set<String> activeExposureKeys) Creates an instance of aAgingOutcomeContextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theactiveExposureKeysrecord component.Returns the value of thecurrentClimaterecord component.final booleanIndicates whether some other object is "equal to" this one.exposure()Returns the value of theexposurerecord component.final inthashCode()Returns a hash code value for this object.org.bukkit.inventory.ItemStacksource()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
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 aAgingOutcomeContextrecord class.- Parameters:
source- the value for thesourcerecord componentexposure- the value for theexposurerecord componentcurrentClimate- the value for thecurrentClimaterecord componentactiveExposureKeys- the value for theactiveExposureKeysrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
source
public org.bukkit.inventory.ItemStack source()Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
exposure
Returns the value of theexposurerecord component.- Returns:
- the value of the
exposurerecord component
-
currentClimate
Returns the value of thecurrentClimaterecord component.- Returns:
- the value of the
currentClimaterecord component
-
activeExposureKeys
-