GlanceNodeMatcher
class GlanceNodeMatcher<R : Any?>
Wrapper for matcher lambdas and related details
Summary
Public constructors |
|---|
<R : Any?> GlanceNodeMatcher( |
Public functions |
|
|---|---|
infix GlanceNodeMatcher<R> |
and(other: GlanceNodeMatcher<R>)Returns whether the given node is matched by this and the |
Boolean |
matches(node: GlanceNode<R>)Returns whether the given node is matched by this matcher. |
Boolean |
matchesAny(nodes: Iterable<GlanceNode<R>>)Returns whether at least one of the given nodes is matched by this matcher. |
operator GlanceNodeMatcher<R> |
not()Returns whether the given node does not match the matcher. |
infix GlanceNodeMatcher<R> |
or(other: GlanceNodeMatcher<R>)Returns whether the given node is matched by this or the |
Public constructors
GlanceNodeMatcher
<R : Any?> GlanceNodeMatcher(
description: String,
matcher: (GlanceNode<R>) -> Boolean
)
| Parameters | |
|---|---|
description: String |
a string explaining to the developer what conditions were being tested. |
matcher: (GlanceNode<R>) -> Boolean |
a lambda performing the actual logic of matching on the GlanceNode |
Public functions
and
infix fun and(other: GlanceNodeMatcher<R>): GlanceNodeMatcher<R>
Returns whether the given node is matched by this and the other matcher.
| Parameters | |
|---|---|
other: GlanceNodeMatcher<R> |
matcher that should also match in addition to current matcher |
matches
fun matches(node: GlanceNode<R>): Boolean
Returns whether the given node is matched by this matcher.
matchesAny
fun matchesAny(nodes: Iterable<GlanceNode<R>>): Boolean
Returns whether at least one of the given nodes is matched by this matcher.
not
operator fun not(): GlanceNodeMatcher<R>
Returns whether the given node does not match the matcher.
or
infix fun or(other: GlanceNodeMatcher<R>): GlanceNodeMatcher<R>
Returns whether the given node is matched by this or the other matcher.
| Parameters | |
|---|---|
other: GlanceNodeMatcher<R> |
matcher that can be tested to match if the current matcher doesn't. |