object predicate
This module contains functionality to describe character predicates, which can be used to determine what characters are valid for different tokens.
- Source
- predicate.scala
- Since
4.0.0
- Alphabetic
- By Inheritance
- predicate
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- final case class Basic(predicate: (Char) => Boolean) extends CharPredicate with Product with Serializable
Basic character predicate, which reads regular Scala 16-bit characters.
Basic character predicate, which reads regular Scala 16-bit characters.
This predicate is only capable of recognising characters within the Basic Multilingual Plane.
- Since
4.0.0
- sealed abstract class CharPredicate extends AnyRef
Base class for character predicates.
Base class for character predicates.
- Since
4.0.0
- final case class Unicode(predicate: (Int) => Boolean) extends CharPredicate with Product with Serializable
More generic character predicate, which reads any unicode codepoint.
More generic character predicate, which reads any unicode codepoint.
Full unicode characters can be up to 24-bits, which is handled by a 32-bit number on the JVM. This predicate can be used, therefore, to handle any single unicode codepoint: this excludes multi-codepoint characters like flags, or modified emojis.
In Scala, characters can be upcast to integers, so still can be used in the description of this predicate.
- Since
4.0.0
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[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[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()
- 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()
- case object NotRequired extends CharPredicate with Product with Serializable
Character predicate that never succeeds.
Character predicate that never succeeds.
- Since
4.0.0
- object implicits
This object provides implicit functionality for constructing
CharPredicate
values.This object provides implicit functionality for constructing
CharPredicate
values.- Since
4.1.0