Contents
Interface Query<ECS_TYPE>
- Type Parameters:
ECS_TYPE- The type of the ECS.
- All Known Subinterfaces:
ReadWriteArchetypeQuery<ECS_TYPE>
- All Known Implementing Classes:
AllLegacyEntityTypesQuery, AllLegacyLivingEntityTypesQuery, AndQuery, AnyQuery, Archetype, ComponentType, ExactArchetypeQuery, NotQuery, OrQuery, ReadWriteQuery
public interface Query<ECS_TYPE>
An interface that represents a query for matching archetypes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <ECS_TYPE> AndQuery<ECS_TYPE> Creates a query that matches if all the provided queries match.static <ECS_TYPE> AnyQuery<ECS_TYPE> any()Creates a query that matches any archetype.static <ECS_TYPE> NotQuery<ECS_TYPE> Creates a query that matches an exact archetype.static <ECS_TYPE> OrQuery<ECS_TYPE> Creates a query that matches if any of the provided queries match.booleanrequiresComponentType(ComponentType<ECS_TYPE, ?> componentType) Controls if a query requires a component and so if used by a system it should be automatically unregistered if a component type is removed.booleanControls if this query should process the providedArchetype.voidvalidate()Validates the internal state of this query.voidvalidateRegistry(ComponentRegistry<ECS_TYPE> registry) Validates that the providedComponentRegistryis compatible with this query.
-
Method Details
-
any
-
not
-
and
Creates a query that matches if all the provided queries match.- Type Parameters:
ECS_TYPE- The type of the ECS.- Parameters:
queries- The queries to match.- Returns:
- the
AndQueryinstance.
-
or
Creates a query that matches if any of the provided queries match.- Type Parameters:
ECS_TYPE- The type of the ECS.- Parameters:
queries- The queries to match.- Returns:
- the
OrQueryinstance.
-
test
-
requiresComponentType
Controls if a query requires a component and so if used by a system it should be automatically unregistered if a component type is removed.- Returns:
trueif thecomponentTypeis required.
-
validateRegistry
Validates that the providedComponentRegistryis compatible with this query.- Parameters:
registry- The component registry to validate against.
-
validate
void validate()Validates the internal state of this query.
-