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.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description static Selector
parse(java.lang.String expression)
Parses a selector expression.default java.util.Set<Shape>
select(Model model)
Matches a selector against a model.java.util.Set<Shape>
select(NeighborProvider neighborProvider, java.util.Set<Shape> shapes)
Matches a selector to a set of shapes.default java.util.Set<Shape>
select(NeighborProvider neighborProvider, Model model)
Matches a selector against a shape index using a custom neighbor visitor.default java.util.Set<Shape>
select(NeighborProvider neighborProvider, ShapeIndex index)
Deprecated.default java.util.Set<Shape>
select(ShapeIndex index)
Deprecated.
-
-
-
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
@Deprecated default java.util.Set<Shape> select(NeighborProvider neighborProvider, ShapeIndex index)
Deprecated.
-
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 shapesmodel
- 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.
-
-