Class SingleViewIterator<T>

java.lang.Object
net.fabricmc.fabric.api.transfer.v1.storage.base.SingleViewIterator<T>
Type Parameters:
T - The type of the stored resource. Experimental feature, we reserve the right to remove or change it without further notice. The transfer API is a complex addition, and we want to be able to correct possible design mistakes.
All Implemented Interfaces:
Iterator<StorageView<T>>, TransactionContext.CloseCallback

@Experimental public final class SingleViewIterator<T> extends Object implements Iterator<StorageView<T>>, TransactionContext.CloseCallback
An iterator for a single StorageView, tied to a transaction. Instances can be created with create(net.fabricmc.fabric.api.transfer.v1.storage.StorageView<T>, net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext).

This class should only be used by implementors of Storage.iterator(net.fabricmc.fabric.api.transfer.v1.transaction.TransactionContext), that wish to expose a single storage view. In that case, usage of this class is recommended, as it will ensure that the storage view can't be accessed after the transaction is closed.