converted tabs to spaces

This commit is contained in:
Jonas Bonér 2010-05-05 22:48:30 +02:00
parent f90e9c3f1a
commit a820b6f0ae
3 changed files with 14 additions and 9 deletions

View file

@ -230,18 +230,23 @@ object Actor extends Logging {
}
}
/** Starts the specified actor and returns it, useful for:
* <pre>val actor = new FooActor
/**
* Starts the specified actor and returns it, useful for simplifying code such as:
* <pre>
* val actor = new FooActor
* actor.start
* //Gets replaced by
* </pre>
* can be replaced with:
* <pre>
* import Actor._
*
* val actor = start(new FooActor)
* </pre>
* </pre>
*/
def start[T <: Actor](actor : T) : T = {
actor.start
actor
}
}
/**

View file

@ -163,7 +163,7 @@ class TransactionalRef[T](initialOpt: Option[T] = None) extends Transactional {
* Necessary to keep from being implicitly converted to Iterable in for comprehensions.
*/
def withFilter(p: T => Boolean): WithFilter = new WithFilter(p)
class WithFilter(p: T => Boolean) {
def map[B](f: T => B): TransactionalRef[B] = self filter p map f
def flatMap[B](f: T => TransactionalRef[B]): TransactionalRef[B] = self filter p flatMap f

View file

@ -98,9 +98,9 @@ class TransactionalRefSpec extends Spec with ShouldMatchers {
var result = 0
atomic {
for (value <- ref) {
result += value
}
for (value <- ref) {
result += value
}
}
result should be(3)