Interface Selector
-
public interface SelectorMatches a set of shapes using a selector expression.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classSelector.RunnerBuilds 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 SelectorfromNode(Node node)Creates a Selector from aNode.static Selectorparse(java.lang.String expression)Parses a selector expression.Selector.Runnerrunner()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.
-
-