Package

com.github.tarao

namedcap

Permalink

package namedcap

Visibility
  1. Public
  2. All

Type Members

  1. abstract class Group extends AnyRef

    Permalink

    A class to represent a group of pattern.

    A class to represent a group of pattern.

    This class is inteded to be used to declare a named pattern by extending the class to a case object. For example,

    case object SomeName extends Group("[a-z]+")

    SomeName defines a pattern matches with lower case alphabets captured as a group. The name of the group defaults to the value of SomeName.toString. Note that the default value of toString for a case object is the name of the object, which is "SomeName" in this example.

  2. trait Implicits extends AnyRef

    Permalink
  3. final class Interpolation extends AnyVal

    Permalink

    An interpolation for named patterns.

  4. class MultiMap extends Map[String, String]

    Permalink

    A map that can store multiple values with the same key.

    A map that can store multiple values with the same key.

    It returns multiple values by getAll() method. All the other methods are the same as single-valued maps; apply() or get() returns the first value.

  5. abstract class NestedGroup extends Group

    Permalink

    A class to make a named pattern representation from a Pattern.

    A class to make a named pattern representation from a Pattern.

    This class is inteded to be used to declare a named pattern by extending the class to a case object, with a Pattern, which may include some named subpatterns. For example, assuming that pattern interpolation generates a Pattern with some named patterns embedded,

    case object SomeName
        extends NestedGroup(pattern"/$AnotherName/$YetAnotherName")

    SomeName defines a named pattern matches with the whole pattern captured as a group like one definition by Pattern.

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

    Permalink

    A class to describe a pattern with named capturing groups.

  7. case class UnnamedGroup(p: Pattern) extends Group with Product with Serializable

    Permalink

    A class to make an unnamed pattern representation from a Pattern.

    A class to make an unnamed pattern representation from a Pattern.

    This class is quite the same as NestedGroup except that the whole pattern does neither have a name nor be captured as a group.

Value Members

  1. object Group

    Permalink
  2. object Implicits extends Implicits

    Permalink
  3. object MultiMap

    Permalink
  4. object NestedGroup

    Permalink
  5. object Pattern extends Implicits with Serializable

    Permalink

Ungrouped