Class StorageProviderComposite
- java.lang.Object
-
- de.extio.spacecraft.shared.model.entity.builtin.live.StorageProviderComposite
-
- All Implemented Interfaces:
StorageProviderEntity
public class StorageProviderComposite extends Object implements StorageProviderEntity
StorageProviderComposite combines multiple StorageProviderEntity to one. This can be useful for example to see items stored on all nearby ships combined in an UI.
-
-
Constructor Summary
Constructors Constructor Description StorageProviderComposite()StorageProviderComposite(List<StorageProviderEntity> children)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<StorageProviderEntity>getChildren()intgetEntityDef()UUIDgetParentCompositeEntity()List<StorageItem>getStorage()intgetStorageAmount()intgetStorageCapacity()doublegetStoredMass()UUIDgetUuid()booleanisStorageAdding()booleanisStorageEjecting()booleanisStorageTaking()booleanisStorageTransferring()voidsetChildren(List<StorageProviderEntity> childs)voidsetStorage(List<StorageItem> storage)voidsetStorageAmount(int amount)voidsetStorageCapacity(int capacity)voidsetStoredMass(double storedMass)intstorageAdd(int entityDefIdx, int amount)voidstorageEject()voidstorageEjectSingle(int entityDefIdx, int amount)voidstorageExplode()intstorageTake(int entityDefIdx, int amount)intstorageTransfer(StorageProviderEntity destination, int entityDefIdx, int amount)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.extio.spacecraft.shared.model.entity.builtin.live.StorageProviderEntity
getStorageAmount, getStorageAmount, hasInStock, hasInStock, storageTake
-
-
-
-
Constructor Detail
-
StorageProviderComposite
public StorageProviderComposite()
-
StorageProviderComposite
public StorageProviderComposite(List<StorageProviderEntity> children)
-
-
Method Detail
-
storageAdd
public int storageAdd(int entityDefIdx, int amount)- Specified by:
storageAddin interfaceStorageProviderEntity
-
storageTake
public int storageTake(int entityDefIdx, int amount)- Specified by:
storageTakein interfaceStorageProviderEntity
-
storageTransfer
public int storageTransfer(StorageProviderEntity destination, int entityDefIdx, int amount)
- Specified by:
storageTransferin interfaceStorageProviderEntity
-
storageEject
public void storageEject()
- Specified by:
storageEjectin interfaceStorageProviderEntity
-
storageEjectSingle
public void storageEjectSingle(int entityDefIdx, int amount)- Specified by:
storageEjectSinglein interfaceStorageProviderEntity
-
storageExplode
public void storageExplode()
- Specified by:
storageExplodein interfaceStorageProviderEntity
-
isStorageAdding
public boolean isStorageAdding()
- Specified by:
isStorageAddingin interfaceStorageProviderEntity
-
isStorageTaking
public boolean isStorageTaking()
- Specified by:
isStorageTakingin interfaceStorageProviderEntity
-
isStorageTransferring
public boolean isStorageTransferring()
- Specified by:
isStorageTransferringin interfaceStorageProviderEntity
-
isStorageEjecting
public boolean isStorageEjecting()
- Specified by:
isStorageEjectingin interfaceStorageProviderEntity
-
getUuid
public UUID getUuid()
- Specified by:
getUuidin interfaceStorageProviderEntity
-
getParentCompositeEntity
public UUID getParentCompositeEntity()
- Specified by:
getParentCompositeEntityin interfaceStorageProviderEntity
-
getEntityDef
public int getEntityDef()
- Specified by:
getEntityDefin interfaceStorageProviderEntity
-
getStorageAmount
public int getStorageAmount()
- Specified by:
getStorageAmountin interfaceStorageProviderEntity
-
setStorageAmount
public void setStorageAmount(int amount)
- Specified by:
setStorageAmountin interfaceStorageProviderEntity
-
getStorageCapacity
public int getStorageCapacity()
- Specified by:
getStorageCapacityin interfaceStorageProviderEntity
-
setStorageCapacity
public void setStorageCapacity(int capacity)
- Specified by:
setStorageCapacityin interfaceStorageProviderEntity
-
getStorage
public List<StorageItem> getStorage()
- Specified by:
getStoragein interfaceStorageProviderEntity
-
setStorage
public void setStorage(List<StorageItem> storage)
- Specified by:
setStoragein interfaceStorageProviderEntity
-
getStoredMass
public double getStoredMass()
- Specified by:
getStoredMassin interfaceStorageProviderEntity
-
setStoredMass
public void setStoredMass(double storedMass)
- Specified by:
setStoredMassin interfaceStorageProviderEntity
-
getChildren
public List<StorageProviderEntity> getChildren()
-
setChildren
public void setChildren(List<StorageProviderEntity> childs)
-
-