Record Class ExtractResourceOutcome
java.lang.Object
java.lang.Record
idlab.colonyops.model.events.ExtractResourceOutcome
- Record Components:
resourceType- the type of resource that was extracteddepositId- entity id of the deposit that is being minedquantityExtracted- the amount extracted this turncrateAfter- the squad member's complete resource crate contents after extractiondepositQuantityLeft- quantity remaining in the deposit after extraction; 0 when the deposit was exhaustedlargeDeposit- whether the deposit is a large resource deposit
- All Implemented Interfaces:
ActionOutcome
public record ExtractResourceOutcome(ResourceType resourceType, String depositId, int quantityExtracted, Map<ResourceType, Integer> crateAfter, int depositQuantityLeft, boolean largeDeposit)
extends Record
implements ActionOutcome
Outcome for a successfully applied
ExtractResourceAction.-
Constructor Summary
ConstructorsConstructorDescriptionExtractResourceOutcome(ResourceType resourceType, String depositId, int quantityExtracted, Map<ResourceType, Integer> crateAfter, int depositQuantityLeft, boolean largeDeposit) Creates an instance of aExtractResourceOutcomerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecrateAfterrecord component.Returns the value of thedepositIdrecord component.intReturns the value of thedepositQuantityLeftrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thelargeDepositrecord component.intReturns the value of thequantityExtractedrecord component.Returns the value of theresourceTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ExtractResourceOutcome
public ExtractResourceOutcome(ResourceType resourceType, String depositId, int quantityExtracted, Map<ResourceType, Integer> crateAfter, int depositQuantityLeft, boolean largeDeposit) Creates an instance of aExtractResourceOutcomerecord class.- Parameters:
resourceType- the value for theresourceTyperecord componentdepositId- the value for thedepositIdrecord componentquantityExtracted- the value for thequantityExtractedrecord componentcrateAfter- the value for thecrateAfterrecord componentdepositQuantityLeft- the value for thedepositQuantityLeftrecord componentlargeDeposit- the value for thelargeDepositrecord 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. -
resourceType
Returns the value of theresourceTyperecord component.- Returns:
- the value of the
resourceTyperecord component
-
depositId
-
quantityExtracted
public int quantityExtracted()Returns the value of thequantityExtractedrecord component.- Returns:
- the value of the
quantityExtractedrecord component
-
crateAfter
Returns the value of thecrateAfterrecord component.- Returns:
- the value of the
crateAfterrecord component
-
depositQuantityLeft
public int depositQuantityLeft()Returns the value of thedepositQuantityLeftrecord component.- Returns:
- the value of the
depositQuantityLeftrecord component
-
largeDeposit
public boolean largeDeposit()Returns the value of thelargeDepositrecord component.- Returns:
- the value of the
largeDepositrecord component
-