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()
int
getEntityDef()
UUID
getParentCompositeEntity()
List<StorageItem>
getStorage()
int
getStorageAmount()
int
getStorageCapacity()
double
getStoredMass()
UUID
getUuid()
boolean
isStorageAdding()
boolean
isStorageEjecting()
boolean
isStorageTaking()
boolean
isStorageTransferring()
void
setChildren(List<StorageProviderEntity> childs)
void
setStorage(List<StorageItem> storage)
void
setStorageAmount(int amount)
void
setStorageCapacity(int capacity)
void
setStoredMass(double storedMass)
int
storageAdd(int entityDefIdx, int amount)
void
storageEject()
void
storageEjectSingle(int entityDefIdx, int amount)
void
storageExplode()
int
storageTake(int entityDefIdx, int amount)
int
storageTransfer(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:
storageAdd
in interfaceStorageProviderEntity
-
storageTake
public int storageTake(int entityDefIdx, int amount)
- Specified by:
storageTake
in interfaceStorageProviderEntity
-
storageTransfer
public int storageTransfer(StorageProviderEntity destination, int entityDefIdx, int amount)
- Specified by:
storageTransfer
in interfaceStorageProviderEntity
-
storageEject
public void storageEject()
- Specified by:
storageEject
in interfaceStorageProviderEntity
-
storageEjectSingle
public void storageEjectSingle(int entityDefIdx, int amount)
- Specified by:
storageEjectSingle
in interfaceStorageProviderEntity
-
storageExplode
public void storageExplode()
- Specified by:
storageExplode
in interfaceStorageProviderEntity
-
isStorageAdding
public boolean isStorageAdding()
- Specified by:
isStorageAdding
in interfaceStorageProviderEntity
-
isStorageTaking
public boolean isStorageTaking()
- Specified by:
isStorageTaking
in interfaceStorageProviderEntity
-
isStorageTransferring
public boolean isStorageTransferring()
- Specified by:
isStorageTransferring
in interfaceStorageProviderEntity
-
isStorageEjecting
public boolean isStorageEjecting()
- Specified by:
isStorageEjecting
in interfaceStorageProviderEntity
-
getUuid
public UUID getUuid()
- Specified by:
getUuid
in interfaceStorageProviderEntity
-
getParentCompositeEntity
public UUID getParentCompositeEntity()
- Specified by:
getParentCompositeEntity
in interfaceStorageProviderEntity
-
getEntityDef
public int getEntityDef()
- Specified by:
getEntityDef
in interfaceStorageProviderEntity
-
getStorageAmount
public int getStorageAmount()
- Specified by:
getStorageAmount
in interfaceStorageProviderEntity
-
setStorageAmount
public void setStorageAmount(int amount)
- Specified by:
setStorageAmount
in interfaceStorageProviderEntity
-
getStorageCapacity
public int getStorageCapacity()
- Specified by:
getStorageCapacity
in interfaceStorageProviderEntity
-
setStorageCapacity
public void setStorageCapacity(int capacity)
- Specified by:
setStorageCapacity
in interfaceStorageProviderEntity
-
getStorage
public List<StorageItem> getStorage()
- Specified by:
getStorage
in interfaceStorageProviderEntity
-
setStorage
public void setStorage(List<StorageItem> storage)
- Specified by:
setStorage
in interfaceStorageProviderEntity
-
getStoredMass
public double getStoredMass()
- Specified by:
getStoredMass
in interfaceStorageProviderEntity
-
setStoredMass
public void setStoredMass(double storedMass)
- Specified by:
setStoredMass
in interfaceStorageProviderEntity
-
getChildren
public List<StorageProviderEntity> getChildren()
-
setChildren
public void setChildren(List<StorageProviderEntity> childs)
-
-