public class DataCenter
extends java.lang.Object
Constructor and Description |
---|
DataCenter()
Creates a new world.
|
Modifier and Type | Method and Description |
---|---|
<T extends DataProcessor> |
addProcessor(T someSystem)
Adds a new Processor to the database
|
IEntity |
createEntity(java.lang.String someName)
Creates a new entity stores it into the database and returns it
|
long |
createEntityId(java.lang.String someName)
Creates a new entity stores it into the database and returns the id
|
DataCore |
getDataCore() |
double |
getDeltaT() |
TLongList |
getEntitiesWithData(java.lang.Class<? extends Data> someDataType,
java.lang.Class<? extends Data>... someFurtherDataTypes)
Returns a list of entities featuring a given set of data
|
TLongList |
getEntitiesWithData(java.util.List<java.lang.Class<? extends Data>> someInterestedDataList)
Returns a list of entities featuring a given set of data
|
IEntity |
getEntity(long someId)
Returns an entity
|
IEntity |
getEntityByName(java.lang.String someName)
Returns an entity
|
long |
getEntityCount()
Returns the current number of entities stored in the database
|
long |
getEntityIdByName(java.lang.String someName)
Returns the id of an entity
|
<T extends DataProcessor> |
getProcessor(java.lang.Class<T> someProcessorClassType)
Returns the processor of the given type
|
void |
removeEntity(long someId)
Removes an entity from the database
|
<T extends DataProcessor> |
removeProcessor(java.lang.Class<T> someProcessorClassType)
Removes a processor from the database
|
void |
setDataCore(DataCore someDataCore) |
void |
updateDelta(double someDelta)
Updates the time difference of the last update
|
public void updateDelta(double someDelta)
public double getDeltaT()
public DataCore getDataCore()
public void setDataCore(DataCore someDataCore)
someDataCore
- the databse to setpublic <T extends DataProcessor> void addProcessor(T someSystem)
someSystem
- public <T extends DataProcessor> T getProcessor(java.lang.Class<T> someProcessorClassType)
someProcessorClassType
- public <T extends DataProcessor> void removeProcessor(java.lang.Class<T> someProcessorClassType)
someProcessorClassType
- public long createEntityId(java.lang.String someName)
someName
- public IEntity createEntity(java.lang.String someName)
someName
- public TLongList getEntitiesWithData(java.lang.Class<? extends Data> someDataType, java.lang.Class<? extends Data>... someFurtherDataTypes)
someDataType
- someFurtherDataTypes
- public TLongList getEntitiesWithData(java.util.List<java.lang.Class<? extends Data>> someInterestedDataList)
someInterestedDataList
- public IEntity getEntity(long someId) throws YanecosException
someId
- YanecosException
public IEntity getEntityByName(java.lang.String someName) throws YanecosException
someName
- YanecosException
public long getEntityIdByName(java.lang.String someName)
someName
- public void removeEntity(long someId) throws YanecosException
someId
- NoSuchEntityException
YanecosException
public long getEntityCount()