| Modifier and Type | Method and Description |
|---|---|
default <B> Pattern<B> |
bind(Pattern<? super B> root,
Pattern<? super A> sub)
Returns a pattern that effectively substitutes a subpattern for
this extractor in a given root pattern.
|
default <B> List<A> |
eagerBindings(Pattern<B> root,
B target)
Returns a collection of values bound to this extractor by all
matches of a patterns for a target.
|
A |
getValue() |
default <B> Iterable<A> |
lazyBindings(Pattern<B> root,
B target) |
A getValue()
default <B> List<A> eagerBindings(Pattern<B> root, B target)
In contrast to lazyBindings(Pattern, Object), the alternative
successful matches are exhausted before this method returns.
root - the pattern to match.target - the object to match against.root against target, in
order. The resulting List object is not shared, and may
be used and modified freely by the caller.lazyBindings(Pattern, Object)default <B> Pattern<B> bind(Pattern<? super B> root, Pattern<? super A> sub)
The structure of the root pattern is not
analyzed. Instead, its bindings to this extractor are enumerated
(as in lazyBindings(Pattern, Object)) and matched
successively with the sub pattern.
root - the root pattern to substitute in. Substitution has
unspecified effect if root does not bind this extractor.sub - the subpattern to substitute.lazyBindings(Pattern, Object)see also the complete user documentation .