SpanSugar

object SpanSugar extends SpanSugar

Companion object that facilitates the importing of SpanSugar members as an alternative to mixing it in. One use case is to import SpanSugar members so you can use them in the Scala interpreter:

$scala -classpath scalatest.jar
Welcome to Scala version 2.9.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_29).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import org.scalatest._
import org.scalatest._

scala> import concurrent.Eventually._
import org.scalatest.concurrent.Eventually._

scala> import time.SpanSugar._
import org.scalatest.time.SpanSugar._

scala> eventually(timeout(100 millis)) { 1 + 1 should equal (3) }
Companion:
class
trait SpanSugar
class Object
trait Matchable
class Any

Type members

Inherited classlikes

class FloatingGrainOfTime(value: Double)

Class containing methods that return a Span time value calculated from the Double value passed to the FloatingGrainOfTime constructor.

Class containing methods that return a Span time value calculated from the Double value passed to the FloatingGrainOfTime constructor.

Value parameters:
value

the value to be converted

Inherited from:
SpanSugar
class GrainOfTime(value: Long)

Class containing methods that return a Span time value calculated from the Long value passed to the GrainOfTime constructor.

Class containing methods that return a Span time value calculated from the Long value passed to the GrainOfTime constructor.

Value parameters:
value

the value to be converted

Inherited from:
SpanSugar

Implicits

Inherited implicits

Implicit conversion that adds time units methods to Doubles.

Implicit conversion that adds time units methods to Doubles.

Value parameters:
d:

the Double to which to add time units methods

Returns:

a FloatingGrainOfTime wrapping the passed Double

Inherited from:
SpanSugar

Implicit conversion that adds time units methods to Floats.

Implicit conversion that adds time units methods to Floats.

Value parameters:
f:

the Float to which to add time units methods

Returns:

a FloatingGrainOfTime wrapping the passed Float

Inherited from:
SpanSugar
implicit def convertIntToGrainOfTime(i: Int): GrainOfTime

Implicit conversion that adds time units methods to Ints.

Implicit conversion that adds time units methods to Ints.

Value parameters:
i:

the Int to which to add time units methods

Returns:

a GrainOfTime wrapping the passed Int

Inherited from:
SpanSugar
implicit def convertLongToGrainOfTime(i: Long): GrainOfTime

Implicit conversion that adds time units methods to Longs.

Implicit conversion that adds time units methods to Longs.

Value parameters:
i:

the Long to which to add time units methods

Returns:

a GrainOfTime wrapping the passed Long

Inherited from:
SpanSugar
implicit val postfixOps: postfixOps
Inherited from:
SpanSugar