implicit final class OnEmptyIteratorWrapper[T] extends AnyVal
Augments scala.collection.Iterator with an onLast
method that registers a function to be
called when there are no elements left.
- T
The value type of the iterator.
- Alphabetic
- By Inheritance
- OnEmptyIteratorWrapper
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
OnEmptyIteratorWrapper(iterator: Iterator[T])
- iterator
The wrapped iterator.
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val iterator: Iterator[T]
-
def
onEmpty(fn: ⇒ Unit): Iterator[T]
Creates an OnEmptyIterator from this iterator.
Creates an OnEmptyIterator from this iterator.
- fn
The function to be evaluated when there are no elements left.
- returns
a new OnEmptyIterator instance.
-
def
toString(): String
- Definition Classes
- Any