Class LimitedStorageImpl

java.lang.Object
com.refinedmods.refinedstorage.api.storage.AbstractProxyStorage
com.refinedmods.refinedstorage.api.storage.limited.LimitedStorageImpl
All Implemented Interfaces:
ExtractableStorage, InsertableStorage, LimitedStorage, Storage, StorageView

@API(status=STABLE, since="2.0.0-milestone.1.2") public class LimitedStorageImpl extends AbstractProxyStorage implements LimitedStorage
This class can decorate any other Storage to add a capacity to it. InsertableStorage.insert(com.refinedmods.refinedstorage.api.resource.ResourceKey, long, Action, Actor) operations will respect this capacity.
  • Constructor Details

    • LimitedStorageImpl

      public LimitedStorageImpl(Storage delegate, long capacity)
      Parameters:
      delegate - the storage that is being decorated
      capacity - the capacity, must be 0 or larger than 0
    • LimitedStorageImpl

      public LimitedStorageImpl(long capacity)
      Constructs the limited storage with a StorageImpl storage.
      Parameters:
      capacity - the capacity, must be 0 or larger than 0
  • Method Details