Interface Selector


  • public interface Selector
    Matches a set of shapes using a selector expression.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  Selector.Runner
      Builds the execution environment for a selector and executes selectors.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Selector IDENTITY
      A selector that always returns all provided values.
    • Method Summary

      Modifier and Type Method Description
      static Selector fromNode​(Node node)
      Creates a Selector from a Node.
      static Selector parse​(java.lang.String expression)
      Parses a selector expression.
      Selector.Runner runner()
      Creates a Selector Runner, used to customize how a selector is executed.
      default java.util.Set<Shape> select​(Model model)
      Matches a selector to a model.
    • Field Detail

      • IDENTITY

        static final Selector IDENTITY
        A selector that always returns all provided values.
    • Method Detail

      • parse

        static Selector parse​(java.lang.String expression)
        Parses a selector expression.
        Parameters:
        expression - Expression to parse.
        Returns:
        Returns the parsed Selector.
      • fromNode

        static Selector fromNode​(Node node)
        Creates a Selector from a Node.
        Parameters:
        node - Node to parse.
        Returns:
        Returns the created selector.
        Throws:
        SourceException - on error.
      • select

        default java.util.Set<Shape> select​(Model model)
        Matches a selector to a model.
        Parameters:
        model - Model used to resolve shapes with.
        Returns:
        Returns the matching shapes.
      • runner

        Selector.Runner runner()
        Creates a Selector Runner, used to customize how a selector is executed.
        Returns:
        Returns the created runner.