Class/Object

com.github.tarao.namedcap

Pattern

Related Docs: object Pattern | package namedcap

Permalink

case class Pattern(patterns: Seq[String], groups: Seq[Group]) extends Product with Serializable

A class to describe a pattern with named capturing groups.

Source
Pattern.scala
Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Pattern
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Pattern(patterns: Seq[String], groups: Seq[Group])

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): Pattern

    Permalink

    Concatenates the pattern with a pattern string and returns a new pattern.

  4. def +(other: Group): Pattern

    Permalink

    Concatenates the pattern with a group and returns a new pattern.

  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def allGroupNames(): Seq[String]

    Permalink

    Returns all named capturing groups in a pattern.

    Returns all named capturing groups in a pattern.

    Nested groups are also listed recursively.

  7. def allNamedGroups(): Seq[(String, Group)]

    Permalink

    Returns all named capturing groups in a pattern.

    Returns all named capturing groups in a pattern.

    Nested groups are also listed recursively.

  8. def apply(instance: String): MultiMap

    Permalink

    Matches the given string with the pattern and returns matched portions with captured group names.

    Matches the given string with the pattern and returns matched portions with captured group names.

    The result is empty if the given string does not match with the pattern.

    If there are multiple groups of the same name in the pattern, the result stores all the captured portions in the order of occurence. These captured portions can be accessed by getAll() method on the result. In this case, apply() or get() returns the first one.

  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def groupNames(): Seq[String]

    Permalink

    Returns named capturing groups in a pattern.

    Returns named capturing groups in a pattern.

    No nested group is listed.

  15. val groups: Seq[Group]

    Permalink
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. def mapGroups(f: (Group) ⇒ String): String

    Permalink

    Returns a pattern string in which the groups are replaced by f.

  18. def mapGroupsIn(instance: String)(f: (Group, String) ⇒ String): String

    Permalink

    Returns a string in which matched portions in instance are replaced by f.

    Returns a string in which matched portions in instance are replaced by f.

    f is a map from a group and a matched portion to a replacement.

  19. def namedGroups(): Seq[(String, Group)]

    Permalink

    Returns named capturing groups with their names.

    Returns named capturing groups with their names.

    No nested group is listed.

  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. val patterns: Seq[String]

    Permalink
  24. def r: Regex

    Permalink

    Returns the pattern as Regex.

  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. def toString(): String

    Permalink

    Returns the pattern as a string.

    Returns the pattern as a string.

    Definition Classes
    Pattern → AnyRef → Any
  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped