Class

org.specs2.reporter

Levels

Related Doc: package reporter

Permalink

case class Levels[T](levelsSeq: Vector[Level[T]] = Vector[Level[T]]()) extends Product with Serializable

This class computes the 'level' of a given fragment. It is used to indent Fragments in a ConsoleReporter and to create a tree or Descriptions in the JUnit runner

It does so by considering that some fragments have an effect on the indentation of the next fragment

- a Text fragment is an Indent(1) so it indents the next fragment once - a Tab(n) fragment is an Indent(n) so it indents the next fragment n times - a Backtab(n) fragment is an Unindent(n) so it un-indents the next fragment n times - an Example fragment is a Terminal(), it doesn't do anything. This means that 2 consecutive examples will stay at the same level - an End fragment is a Reset, it set the level of the next fragment to 0 level

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Levels
  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 Levels(levelsSeq: Vector[Level[T]] = Vector[Level[T]]())

    Permalink

Value Members

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def add(other: Levels[T]): Levels[T]

    Permalink

    returns

    the concatenation of 2 levels

  5. final def asInstanceOf[T0]: T0

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

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

    Permalink
    Definition Classes
    AnyRef
  8. def equals(a: Any): Boolean

    Permalink
    Definition Classes
    Levels → Equals → AnyRef → Any
  9. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  11. lazy val isEmpty: Boolean

    Permalink

    returns

    true if there are no levels

  12. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  13. lazy val level: Int

    Permalink

    returns

    alias for the last level

  14. lazy val levels: Seq[Level[T]]

    Permalink

    returns

    all the levels, computed with the LevelMonoid

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

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

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

    Permalink
    Definition Classes
    AnyRef
  18. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  19. def toTree[S](m: (T, Int) ⇒ Option[S]): Tree[S]

    Permalink

    map each node to another type given: the current type, the node number

    map each node to another type given: the current type, the node number

    returns

    a Tree[S] based on the level of each block, mapping each node to value of type S and possibly skipping nodes

  20. def toTree[S](m: (T, Seq[S], Int) ⇒ Option[S]): Tree[S]

    Permalink

    map each node to another type given: the current type, the path from root (without the current node), the node number

    map each node to another type given: the current type, the path from root (without the current node), the node number

    returns

    a Tree[S] based on the level of each block, mapping each node to value of type S and possibly skipping nodes

  21. lazy val toTree: Tree[T]

    Permalink

    returns

    a Tree[T] based on the level of each block

  22. def toTreeLoc[S](m: (T, Seq[S], Int) ⇒ Option[S]): TreeLoc[S]

    Permalink

    WARNING this method assumes that the Levels are not empty!!

    WARNING this method assumes that the Levels are not empty!!

    returns

    a Tree[S] based on the level of each block, mapping each node to value of type S and possibly skipping nodes, passing the numeric label of the current node.

    See also

    JUnitDescriptions

  23. lazy val toTreeLoc: TreeLoc[T]

    Permalink

    returns

    a TreeLoc[T] based on the level of each block

  24. final def wait(): Unit

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. 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