Record Class ProcessBinding
java.lang.Object
java.lang.Record
fr.robie.machineengine.api.process.ProcessBinding
- Record Components:
inputs- storages inputs are taken from (and returned to on cancel), in orderoutput- storage outputs go tocosts- storages per-tick costs are paid from: each cost is taken from these storages in order (e.g. energy, then a chemical tank); empty (ornull) for the first input storageextraOutputs- more storages outputs go to whenoutputdoes not take them (e.g. an item slot and a chemical tank); empty (ornull) for none
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncosts()Returns the value of thecostsrecord component.Storages costs are paid from, in order; never empty unless there are no inputs either.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theextraOutputsrecord component.final inthashCode()Returns a hash code value for this object.inputs()Returns the value of theinputsrecord component.static @NotNull ProcessBinding@NotNull Stringoutput()Returns the value of theoutputrecord component.outputs()Every output storage, in the order outputs try them.final StringtoString()Returns a string representation of this record class.@NotNull ProcessBinding@NotNull ProcessBindingwithExtraOutputs(@NotNull String... storages) This binding, with outputs also going tostorages.
-
Constructor Details
-
ProcessBinding
public ProcessBinding(@NotNull @NotNull List<String> inputs, @NotNull @NotNull String output, @Nullable @Nullable List<String> costs, @Nullable @Nullable List<String> extraOutputs) Creates an instance of aProcessBindingrecord class.- Parameters:
inputs- the value for theinputsrecord componentoutput- the value for theoutputrecord componentcosts- the value for thecostsrecord componentextraOutputs- the value for theextraOutputsrecord component
-
ProcessBinding
-
-
Method Details
-
outputs
-
withExtraOutputs
This binding, with outputs also going tostorages. -
of
@NotNull public static @NotNull ProcessBinding of(@NotNull @NotNull String input, @NotNull @NotNull String output) -
withCosts
-
costStorages
-
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). -
inputs
-
output
-
costs
-
extraOutputs
Returns the value of theextraOutputsrecord component.- Returns:
- the value of the
extraOutputsrecord component
-