Record Class MachineEvents.Resources
java.lang.Object
java.lang.Record
fr.robie.machineengine.api.machine.MachineEvents.Resources
- Enclosing class:
MachineEvents
public static record MachineEvents.Resources(@NotNull MachineInstance machine, @NotNull Map<ResourceVariant, Long> inserted, @NotNull Map<ResourceVariant, Long> extracted)
extends Record
Amounts inserted and extracted since the last event of this machine.
-
Constructor Summary
ConstructorsConstructorDescriptionResources(@NotNull MachineInstance machine, @NotNull Map<ResourceVariant, Long> inserted, @NotNull Map<ResourceVariant, Long> extracted) Creates an instance of aResourcesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NotNull Map<ResourceVariant, Long> Returns the value of theextractedrecord component.final inthashCode()Returns a hash code value for this object.@NotNull Map<ResourceVariant, Long> inserted()Returns the value of theinsertedrecord component.@NotNull MachineInstancemachine()Returns the value of themachinerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Resources
public Resources(@NotNull @NotNull MachineInstance machine, @NotNull @NotNull Map<ResourceVariant, Long> inserted, @NotNull @NotNull Map<ResourceVariant, Long> extracted) Creates an instance of aResourcesrecord class.- Parameters:
machine- the value for themachinerecord componentinserted- the value for theinsertedrecord componentextracted- the value for theextractedrecord 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). -
machine
Returns the value of themachinerecord component.- Returns:
- the value of the
machinerecord component
-
inserted
Returns the value of theinsertedrecord component.- Returns:
- the value of the
insertedrecord component
-
extracted
Returns the value of theextractedrecord component.- Returns:
- the value of the
extractedrecord component
-