Package com._1c.g5.aef2.scenes
Interface IComponentSearchProvider
public interface IComponentSearchProvider
A contract for providers used by a scene to search components by queries.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
A contract for objects that can match a component against a specific query and generate queries for components. -
Method Summary
Modifier and TypeMethodDescriptionStream<IComponent<?>>
find
(IComponent<?> rootComponent, Object query) Searches for components using a query in the component tree defined by a root component.static IComponentSearchProvider
Returns a search provider that hierarchically traverses the component tree until it finds a component which satisfies a given matcher.getQuery
(IComponent<?> rootComponent, IComponent<?> component) Returns a query object representing a given component.
-
Method Details
-
firstChild
Returns a search provider that hierarchically traverses the component tree until it finds a component which satisfies a given matcher.- Parameters:
matcher
- The matcher that will be applied to components- Returns:
- The search provider
-
find
Searches for components using a query in the component tree defined by a root component.- Parameters:
query
- An object representing a query (or an identifier, that depends on implementation) to be searched- Returns:
- a stream with components, never
null
, may be empty if nothing was found
-
getQuery
Returns a query object representing a given component. It is expected that the provider will then be able to find this component using the query relative torootComponent
.- Parameters:
rootComponent
- The parent of the component relative to which the query will be obtainedcomponent
- The component for which the query will be obtained- Returns:
- The query
-