public interface EntitySet extends java.util.Set<Entity>
Modifier and Type | Method and Description |
---|---|
boolean |
applyChanges()
Applies any accumulated changes to this list's entities since
the last time it was called and returns true if there were
changes.
|
boolean |
applyChanges(java.util.Set<EntityChange> updates)
Deprecated.
Changes collected this way are not accurate and this
method will be removed in the next version. The
signature is kept only for compile-time compatibility
as all of the implementations now ignore the updates argument.
|
void |
clearChangeSets()
Clears all pending change sets accumulated during the last
applyChanges().
|
boolean |
containsId(EntityId id)
Returns true if this set contains the entity with the
specified ID.
|
java.util.Set<Entity> |
getAddedEntities()
Returns the entities that were added during applyChanges().
|
java.util.Set<Entity> |
getChangedEntities()
Returns the entities that were changed during applyChanges().
|
Entity |
getEntity(EntityId id)
Returns this set's version of the Entity for the specified
ID or null if this set does not contain the specified entity.
|
java.util.Set<EntityId> |
getEntityIds()
Returns all of the EntityIds currently in this set.
|
java.util.Set<Entity> |
getRemovedEntities()
Returns the entities that were removed during applyChanges().
|
boolean |
hasChanges()
Returns true if there were entity changes during the last
applyChanges().
|
boolean |
hasType(java.lang.Class type)
Returns true if this EntitySet is made of entities
that have the specified type of component.
|
void |
release()
Releases this entity set from processing further entity
updates.
|
void |
resetFilter(ComponentFilter filter)
Swaps out the current main filter for a new one.
|
void resetFilter(ComponentFilter filter)
boolean containsId(EntityId id)
java.util.Set<EntityId> getEntityIds()
Entity getEntity(EntityId id)
java.util.Set<Entity> getAddedEntities()
java.util.Set<Entity> getChangedEntities()
java.util.Set<Entity> getRemovedEntities()
void clearChangeSets()
boolean hasChanges()
boolean applyChanges()
boolean applyChanges(java.util.Set<EntityChange> updates)
void release()
boolean hasType(java.lang.Class type)