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.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static Selector
fromNode(Node node)
Creates a Selector from aNode
.static Selector
parse(java.lang.String expression)
Parses a selector expression.Selector.Runner
runner()
Creates a SelectorRunner
, 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 aNode
.- 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 SelectorRunner
, used to customize how a selector is executed.- Returns:
- Returns the created runner.
-
-