Class PartPosIteratorHandlerRoundRobin
java.lang.Object
org.cyclops.integrateddynamics.core.network.PartPosIteratorHandlerRoundRobin
- All Implemented Interfaces:
IPartPosIteratorHandler
An
IPartPosIteratorHandler that maintains the state of an iterator
and achieves round-robin iteration.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Copy this handler.handleIterator(Supplier<Iterator<PartPos>> iteratorSupplier, int channel) Given an iteraror constructor, determine the starting position of it.
-
Constructor Details
-
PartPosIteratorHandlerRoundRobin
public PartPosIteratorHandlerRoundRobin(int offset) -
PartPosIteratorHandlerRoundRobin
public PartPosIteratorHandlerRoundRobin()
-
-
Method Details
-
handleIterator
Description copied from interface:IPartPosIteratorHandlerGiven an iteraror constructor, determine the starting position of it.- Specified by:
handleIteratorin interfaceIPartPosIteratorHandler- Parameters:
iteratorSupplier- A constructor of an iterator ofPartPos. Each invocation must produce a new iterator.channel- The channel in which the iterator is being handled.- Returns:
- An iterator, may be ended.
-
clone
Description copied from interface:IPartPosIteratorHandlerCopy this handler. This should be cheap to call, as this can be called multiple times per tick.- Specified by:
clonein interfaceIPartPosIteratorHandler- Overrides:
clonein classObject- Returns:
- Create a stateful copy of this handler.
-