Record Class IIngredientChannelInsertPreConsumer.Result<T>
java.lang.Object
java.lang.Record
org.cyclops.integrateddynamics.core.network.IIngredientChannelInsertPreConsumer.Result<T>
- Record Components:
remaining- What still has to be inserted into the network. Only what a pre-consumer took away is missing from this.unclaimed- What no pre-consumer has claimed yet, and a next one may still claim. Both what was taken away and what was only claimed is missing from this, so this is never larger than the remaining part.
- Enclosing interface:
IIngredientChannelInsertPreConsumer<T>
public static record IIngredientChannelInsertPreConsumer.Result<T>(T remaining, T unclaimed)
extends Record
The outcome of a pre-consumer insertion.
These two are tracked separately because a pre-consumer can do two independent things
with the insertion it observes:
It can take part of it away, so that that part is no longer inserted into the network.
A crafting interface does this with the produced ingredients that a dependent crafting job
still needs as an input, which it moves into that job's buffer.
It can also claim part of it, without taking it away:
it recognizes that part as the ingredient it was waiting for, but the ingredient itself
still has to reach the network storage. A crafting interface does this with the outputs of
its own crafting jobs: seeing the output is what completes the job, but the output is
exactly what the network asked for, so it must still be stored.
Taking away reduces both, claiming only reduces the unclaimed part.
Claiming has to be tracked separately for this reason:
an insertion that is only claimed is passed on to the next pre-consumer unchanged,
so without it, every pre-consumer would claim that same insertion for itself.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theremainingrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theunclaimedrecord component.
-
Constructor Details
-
Result
-
-
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). -
remaining
-
unclaimed
-