Interface Selector

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface Selector
    Matches a set of shapes using a selector expression.
    • Field Detail

      • IDENTITY

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

      • select

        java.util.Set<Shape> select​(NeighborProvider neighborProvider,
                                    java.util.Set<Shape> shapes)
        Matches a selector to a set of shapes.
        Parameters:
        neighborProvider - Provides neighbors for shapes.
        shapes - Matching context of shapes.
        Returns:
        Returns the matching shapes.
      • select

        default java.util.Set<Shape> select​(NeighborProvider neighborProvider,
                                            Model model)
        Matches a selector against a shape index using a custom neighbor visitor.
        Parameters:
        neighborProvider - Provides neighbors for shapes
        model - Model to query.
        Returns:
        Returns the matching shapes.
      • select

        @Deprecated
        default java.util.Set<Shape> select​(ShapeIndex index)
        Deprecated.
      • select

        default java.util.Set<Shape> select​(Model model)
        Matches a selector against a model.
        Parameters:
        model - Model to query.
        Returns:
        Returns the matching shapes.
      • parse

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