trait MapWhile[+T, I <: Iterable[T]] extends AnyRef
Can be used to add a mapWhile() function to a collection type.
- T
type of value contained in the collection
- I
the collection, which must be a subclass of
Iterable[T]
- Alphabetic
- By Inheritance
- MapWhile
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
- abstract val container: I
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##(): Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def mapWhile[U, J](mapper: (T) => U, predicate: (U) => Boolean)(implicit cbf: Factory[U, J]): J
Perform a map on an
Iterablesubclass until the predicate function returnsfalse.Perform a map on an
Iterablesubclass until the predicate function returnsfalse. Combinesmap()andtakeWhile()in a more efficient manner. The predicate is called after the mapping operation is performed.- U
the type of the returned subclass
- J
the type of the returned
Iterablesubclass- mapper
the mapper function
- predicate
the predicate. The mapping operation will continue until this function returns
falseor the iterable is exhausted- cbf
the
CanBuildFromfactory, which allows this function to make an instance of the subclass without knowing what it is- returns
the mapped (and possibly filtered) result
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()