Attributes
- Companion
- trait
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
Members list
Type members
Classlikes
Combines two SingleElementContextMatcher
s such that the resulting matcher will succeed if both the right
and left
matchers succeed, and returns the results of both matchers (as a tuple, but reduced via the TypeReduce
rules)
Combines two SingleElementContextMatcher
s such that the resulting matcher will succeed if both the right
and left
matchers succeed, and returns the results of both matchers (as a tuple, but reduced via the TypeReduce
rules)
Type parameters
- A
-
The left matcher's context type
- B
-
The right matcher's context type
- R
-
The type reduction of
(A, B)
Value parameters
- left
-
The left matcher, with a context type of
A
- reduce
-
The
TypeReduce
rule - right
-
The right matcher, with a context type of
B
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
SingleElementContextMatcher that delegates to the given function f
to perform its match.
SingleElementContextMatcher that delegates to the given function f
to perform its match.
Type parameters
- A
-
The matched context type
Value parameters
- f
-
A function that performs the context match on a single element
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Similar to ContextMatcher.Mapped
, but specialized for SingleElementContextMatcher
Similar to ContextMatcher.Mapped
, but specialized for SingleElementContextMatcher
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
Similar to ContextMatcher.Or
, but specialized for SingleElementContextMatcher
Similar to ContextMatcher.Or
, but specialized for SingleElementContextMatcher
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
SingleElementContextMatcher that successfully matches (with no result) if the given predicate function returns true
for the matched element.
SingleElementContextMatcher that successfully matches (with no result) if the given predicate function returns true
for the matched element.
Value parameters
- f
-
The predicate function
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Value members
Concrete methods
Create a new single-element matcher which calls the given matcher function f
on the first element of the stack. If f
returns None
, the match fails, otherwise, the match succeeds.
Create a new single-element matcher which calls the given matcher function f
on the first element of the stack. If f
returns None
, the match fails, otherwise, the match succeeds.
Type parameters
- A
-
The match result type
Value parameters
- f
-
The matcher function
Attributes
- Returns
-
A new single-element matcher which applies
f
to the stack head
Create a new single-element matcher which calls the given matcher function f
on the first element of the stack. If f
returns None
, the match fails, otherwise, the match succeeds.
Create a new single-element matcher which calls the given matcher function f
on the first element of the stack. If f
returns None
, the match fails, otherwise, the match succeeds.
Type parameters
- A
-
The match result type
Value parameters
- f
-
The matcher function
- name
-
This value will be used as the matcher's
toString
Attributes
- Returns
-
A new single-element matcher which applies
f
to the stack head
Create a new single-element matcher which calls the given predicate function f
on the first element of the stack. If f
returns true
, the match succeeds. Otherwise, the match fails.
Create a new single-element matcher which calls the given predicate function f
on the first element of the stack. If f
returns true
, the match succeeds. Otherwise, the match fails.
Value parameters
- f
-
The predicate function
Attributes
- Returns
-
A new single-element matcher which uses
f
to determine a match
Create a new single-element matcher which calls the given predicate function f
on the first element of the stack. If f
returns true
, the match succeeds. Otherwise, the match fails.
Create a new single-element matcher which calls the given predicate function f
on the first element of the stack. If f
returns true
, the match succeeds. Otherwise, the match fails.
Value parameters
- f
-
The predicate function
- name
-
This value will be used as the matcher's
toString
Attributes
- Returns
-
A new single-element matcher which uses
f
to determine a match