Interface IComponentSearchProvider


  • public interface IComponentSearchProvider
    A contract for providers used by a scene to search components by queries.
    • Method Detail

      • find

        Stream<IComponent<?>> find​(IComponent<?> rootComponent,
                                   Object query)
        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

        Object getQuery​(IComponent<?> rootComponent,
                        IComponent<?> component)
        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 to rootComponent.
        Parameters:
        rootComponent - The parent of the component relative to which the query will be obtained
        component - The component for which the query will be obtained
        Returns:
        The query