java.lang.Object
technology.sola.ecs.cache.ViewImpl<E>
- Type Parameters:
E- theViewEntryimplementation
- All Implemented Interfaces:
View<E>
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe component classes for the view. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract @Nullable EcreateEntryFromEntity(Entity entity) booleanisWatchingComponent(Class<? extends Component> componentClassToCheck) Checks if this view responds to anEntityadding or removing the component type or if an entity is deleted while having the component type.
-
Field Details
-
componentClasses
The component classes for the view.
-
-
Constructor Details
-
ViewImpl
Creates a new view watching desired components.- Parameters:
componentClasses- theComponentclasses to watch
-
-
Method Details
-
getEntries
-
isWatchingComponent
Checks if this view responds to anEntityadding or removing the component type or if an entity is deleted while having the component type.- Specified by:
isWatchingComponentin interfaceView<E extends ViewEntry>- Parameters:
componentClassToCheck- theComponentclass to check- Returns:
- true if view will update
-
createEntryFromEntity
- Parameters:
entity- theEntityto create aViewEntryfrom- Returns:
- the
ViewEntry
-