Record Class ExtractResourceOutcome

java.lang.Object
java.lang.Record
idlab.colonyops.model.events.ExtractResourceOutcome
Record Components:
resourceType - the type of resource that was extracted
depositId - entity id of the deposit that is being mined
quantityExtracted - the amount extracted this turn
crateAfter - the squad member's complete resource crate contents after extraction
depositQuantityLeft - quantity remaining in the deposit after extraction; 0 when the deposit was exhausted
largeDeposit - 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 Details

    • ExtractResourceOutcome

      public ExtractResourceOutcome(ResourceType resourceType, String depositId, int quantityExtracted, Map<ResourceType, Integer> crateAfter, int depositQuantityLeft, boolean largeDeposit)
      Creates an instance of a ExtractResourceOutcome record class.
      Parameters:
      resourceType - the value for the resourceType record component
      depositId - the value for the depositId record component
      quantityExtracted - the value for the quantityExtracted record component
      crateAfter - the value for the crateAfter record component
      depositQuantityLeft - the value for the depositQuantityLeft record component
      largeDeposit - the value for the largeDeposit 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • resourceType

      public ResourceType resourceType()
      Returns the value of the resourceType record component.
      Returns:
      the value of the resourceType record component
    • depositId

      public String depositId()
      Returns the value of the depositId record component.
      Returns:
      the value of the depositId record component
    • quantityExtracted

      public int quantityExtracted()
      Returns the value of the quantityExtracted record component.
      Returns:
      the value of the quantityExtracted record component
    • crateAfter

      public Map<ResourceType, Integer> crateAfter()
      Returns the value of the crateAfter record component.
      Returns:
      the value of the crateAfter record component
    • depositQuantityLeft

      public int depositQuantityLeft()
      Returns the value of the depositQuantityLeft record component.
      Returns:
      the value of the depositQuantityLeft record component
    • largeDeposit

      public boolean largeDeposit()
      Returns the value of the largeDeposit record component.
      Returns:
      the value of the largeDeposit record component