trait
Walker[+A] extends AnyRef
Abstract Value Members
-
abstract
def
foreach(f: (A) ⇒ Unit): Unit
Concrete Value Members
-
final
def
!=(arg0: AnyRef): Boolean
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
def
++[B >: A](other: Walker[B]): Walker[B]
-
final
def
==(arg0: AnyRef): Boolean
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
filter(p: (A) ⇒ Boolean): Walker[A]
-
def
finalize(): Unit
-
def
flatMap[B](f: (A) ⇒ GenTraversableOnce[B]): Walker[B]
-
def
foldLeft[B](zero: B)(combine: (B, A) ⇒ B): B
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
def
map[B](f: (A) ⇒ B): Walker[B]
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
def
size: Long
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toList: List[A]
-
def
toSet[B >: A]: Set[B]
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
def
withFilter(p: (A) ⇒ Boolean): Walker[A]
Inherited from AnyRef
Inherited from Any
Walkers provide a mechanism for walking through an underlying listish thing, exposed as a "foreach" method. They do not return iterators, nor do they allow random access. This allows them to guarantee post-iteration cleanup actions on the underlying resource, which will occur even if exceptions are thrown while walking.
Walkers can be constructed such that the "foreach" method can only be called once. In that case, subsequent calls should throw an IllegalStateException. Walkers can also be constructed with "foreach" methods that can be called multiple times. In that case, each run should create and then clean up the resource-- saving state across runs is usually counterproductive.