object SingleItemContextMatcher
- Alphabetic
- By Inheritance
- SingleItemContextMatcher
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- case class And[Item, A, B, R](left: SingleItemContextMatcher[Item, A], right: SingleItemContextMatcher[Item, B])(implicit reduce: Aux[A, B, R]) extends SingleItemContextMatcher[Item, R] with Product with Serializable
Combines two
SingleElementContextMatcher
s such that the resulting matcher will succeed if both theright
andleft
matchers succeed, and returns the results of both matchers (as a tuple, but reduced via theTypeReduce
rules)Combines two
SingleElementContextMatcher
s such that the resulting matcher will succeed if both theright
andleft
matchers succeed, and returns the results of both matchers (as a tuple, but reduced via theTypeReduce
rules)- A
The left matcher's context type
- B
The right matcher's context type
- R
The type reduction of
(A, B)
- left
The left matcher, with a context type of
A
- right
The right matcher, with a context type of
B
- reduce
The
TypeReduce
rule
- class Default[Item, A] extends SingleItemContextMatcher[Item, A]
SingleElementContextMatcher that delegates to the given function
f
to perform its match.SingleElementContextMatcher that delegates to the given function
f
to perform its match.- A
The matched context type
- case class Mapped[Item, A, B](inner: SingleItemContextMatcher[Item, A], op: String = "map")(f: (A) => Option[B]) extends SingleItemContextMatcher[Item, B] with Product with Serializable
Similar to
ContextMatcher.Mapped
, but specialized forSingleElementContextMatcher
- case class Or[Item, A](left: SingleItemContextMatcher[Item, A], right: SingleItemContextMatcher[Item, A]) extends SingleItemContextMatcher[Item, A] with Product with Serializable
Similar to
ContextMatcher.Or
, but specialized forSingleElementContextMatcher
- class Predicate[Item] extends SingleItemContextMatcher[Item, Unit]
SingleElementContextMatcher that successfully matches (with no result) if the given predicate function returns
true
for the matched element.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply[Item, A](name: String, f: (Item) => Option[A]): SingleItemContextMatcher[Item, A]
Create a new single-element matcher which calls the given matcher function
f
on the first element of the stack.Create a new single-element matcher which calls the given matcher function
f
on the first element of the stack. Iff
returnsNone
, the match fails, otherwise, the match succeeds.- A
The match result type
- name
This value will be used as the matcher's
toString
- f
The matcher function
- returns
A new single-element matcher which applies
f
to the stack head
- def apply[Item, A](f: (Item) => Option[A]): SingleItemContextMatcher[Item, A]
Create a new single-element matcher which calls the given matcher function
f
on the first element of the stack.Create a new single-element matcher which calls the given matcher function
f
on the first element of the stack. Iff
returnsNone
, the match fails, otherwise, the match succeeds.- A
The match result type
- f
The matcher function
- returns
A new single-element matcher which applies
f
to the stack head
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def predicate[Item](name: String, f: (Item) => Boolean): SingleItemContextMatcher[Item, Unit]
Create a new single-element matcher which calls the given predicate function
f
on the first element of the stack.Create a new single-element matcher which calls the given predicate function
f
on the first element of the stack. Iff
returnstrue
, the match succeeds. Otherwise, the match fails.- name
This value will be used as the matcher's
toString
- f
The predicate function
- returns
A new single-element matcher which uses
f
to determine a match
- def predicate[Item](f: (Item) => Boolean): SingleItemContextMatcher[Item, Unit]
Create a new single-element matcher which calls the given predicate function
f
on the first element of the stack.Create a new single-element matcher which calls the given predicate function
f
on the first element of the stack. Iff
returnstrue
, the match succeeds. Otherwise, the match fails.- f
The predicate function
- returns
A new single-element matcher which uses
f
to determine a match
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()