GlanceNodeMatcher

class GlanceNodeMatcherAny?>

Wrapper for matcher lambdas and related details

Summary

Public constructors

Any?> GlanceNodeMatcher(
    description: String,
    matcher: (GlanceNode) -> Boolean
)

Public functions

infix GlanceNodeMatcher

Returns whether the given node is matched by this and the other matcher.

Boolean

Returns whether the given node is matched by this matcher.

Boolean

Returns whether at least one of the given nodes is matched by this matcher.

operator GlanceNodeMatcher
not()

Returns whether the given node does not match the matcher.

infix GlanceNodeMatcher

Returns whether the given node is matched by this or the other matcher.

Public constructors

GlanceNodeMatcher

Any?> GlanceNodeMatcher(
    description: String,
    matcher: (GlanceNode) -> Boolean
)
Parameters
description: String

a string explaining to the developer what conditions were being tested.

matcher: (GlanceNode) -> Boolean

a lambda performing the actual logic of matching on the GlanceNode

Public functions

and

Added in 1.1.0
infix fun and(other: GlanceNodeMatcher): GlanceNodeMatcher

Returns whether the given node is matched by this and the other matcher.

Parameters
other: GlanceNodeMatcher

matcher that should also match in addition to current matcher

matches

Added in 1.1.0
fun matches(node: GlanceNode): Boolean

Returns whether the given node is matched by this matcher.

matchesAny

fun matchesAny(nodes: Iterable<GlanceNode>): Boolean

Returns whether at least one of the given nodes is matched by this matcher.

not

Added in 1.1.0
operator fun not(): GlanceNodeMatcher

Returns whether the given node does not match the matcher.

or

Added in 1.1.0
infix fun or(other: GlanceNodeMatcher): GlanceNodeMatcher

Returns whether the given node is matched by this or the other matcher.

Parameters
other: GlanceNodeMatcher

matcher that can be tested to match if the current matcher doesn't.