Scala Library
|
|
scala/collection/IterableViewLike.scala
]
trait
IterableViewLike[+A, +Coll, +This <: IterableView[A, Coll] with
IterableViewLike[A, Coll, This]]
extends
Iterable[A] with
IterableLike[A, This] with
TraversableView[A, Coll] with
TraversableViewLike[A, Coll, This]Method Summary | |
protected override def
|
newAppended
[B >: A](that : Traversable[B]) : Transformed[B]
Boilerplate method, to override in each subclass
This method could be eliminated if Scala had virtual classes
|
protected override def
|
newDroppedWhile (p : (A) => Boolean) : Transformed[A] |
protected override def
|
newFiltered (p : (A) => Boolean) : Transformed[A] |
protected override def
|
newFlatMapped [B](f : (A) => Traversable[B]) : Transformed[B] |
protected override def
|
newMapped [B](f : (A) => B) : Transformed[B] |
protected override def
|
newSliced (_from : Int, _until : Int) : Transformed[A] |
protected override def
|
newTakenWhile (p : (A) => Boolean) : Transformed[A] |
protected def
|
newZipped [B](that : Iterable[B]) : Transformed[(A, B)] |
protected def
|
newZippedAll [A1 >: A, B](that : Iterable[B], _thisElem : A1, _thatElem : B) : Transformed[(A1, B)] |
override def
|
stringPrefix
: java.lang.String
Defines the prefix of this object's
toString representation. |
override def
|
zip
[A1 >: A, B, That](that : Iterable[B])(implicit bf : CanBuildFrom[This, (A1, B), That]) : That
Returns an iterable formed from this iterable and another iterable
by combining corresponding elements in pairs.
If one of the two iterables is longer than the other, its remaining elements are ignored.
|
override def
|
zipAll
[B, A1 >: A, That](that : Iterable[B], thisElem : A1, thatElem : B)(implicit bf : CanBuildFrom[This, (A1, B), That]) : That
Returns an iterable formed from this iterable and the specified iterable
that by associating each element of the former with
the element at the same position in the latter. |
override def
|
zipWithIndex
[A1 >: A, That](implicit bf : CanBuildFrom[This, (A1, Int), That]) : That
Zips this iterable with its indices (startiong from 0).
|
Methods inherited from TraversableViewLike | |
underlying (abstract), newBuilder, force, ++, ++, map, flatMap, filter, init, drop, take, slice, dropWhile, takeWhile, span, splitAt |
Methods inherited from Iterable | |
companion |
Methods inherited from IterableLike | |
iterator (abstract), thisCollection, toCollection, elements, foreach, forall, exists, find, isEmpty, foldRight, reduceRight, toIterable, head, takeWhile, takeRight, dropRight, copyToArray, sameElements, toStream, canEqual, view, view, first, firstOption, projection |
Methods inherited from GenericTraversableTemplate | |
genericBuilder, unzip, flatten, transpose |
Methods inherited from TraversableLike | |
repr, nonEmpty, size, hasDefiniteSize, ++, ++, map, flatMap, filter, filterNot, partialMap, remove, partition, groupBy, count, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, sum, product, min, max, headOption, tail, last, lastOption, dropWhile, span, copyToBuffer, copyToArray, toArray, toList, toSeq, toIndexedSeq, toSet, mkString, mkString, mkString, addString, addString, addString, toString, withFilter |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Class Summary | |
trait
|
Appended
[B >: A] extends Transformed[B] with Appended[B]
|
trait
|
DroppedWhile
extends Transformed[A] with DroppedWhile
|
trait
|
Filtered
extends Transformed[A] with Filtered
|
trait
|
FlatMapped
[B] extends Transformed[B] with FlatMapped[B]
|
trait
|
Mapped
[B] extends Transformed[B] with Mapped[B]
|
trait
|
Sliced
extends Transformed[A] with Sliced
pre: from >= 0
|
trait
|
TakenWhile
extends Transformed[A] with TakenWhile
|
trait
|
Transformed
[+B] extends IterableView[B, Coll] with Transformed[B]
|
trait
|
Zipped
[B] extends Transformed[(A, B)] with AnyRef
|
trait
|
ZippedAll
[A1 >: A, B] extends Transformed[(A1, B)] with AnyRef
|
Method Details |
override
def
zip[A1 >: A, B, That](that : Iterable[B])(implicit
bf : CanBuildFrom[This, (A1, B), That]) : That
that -
The iterable providing the second half of each result pairoverride
def
zipAll[B, A1 >: A, That](that : Iterable[B], thisElem : A1, thatElem : B)(implicit
bf : CanBuildFrom[This, (A1, B), That]) : That
that
by associating each element of the former with
the element at the same position in the latter.that -
iterable that
may have a different length as the self iterable.thisElem -
element thisElem
is used to fill up the resulting iterable if the self iterable is shorter than
that
thatElem -
element thatElem
is used to fill up the resulting iterable if that
is shorter than
the self iterableSequence((a0,b0), ..., (an,bn), (elem,bn+1),
..., {elem,bm})
when [a0, ..., an] zip
[b0, ..., bm]
is
invoked where m > n
.protected
def
newZipped[B](that : Iterable[B]) : Transformed[(A, B)]
protected
def
newZippedAll[A1 >: A, B](that : Iterable[B], _thisElem : A1, _thatElem : B) : Transformed[(A1, B)]
protected override
def
newAppended[B >: A](that : Traversable[B]) : Transformed[B]
protected override
def
newMapped[B](f : (A) => B) : Transformed[B]
protected override
def
newFlatMapped[B](f : (A) => Traversable[B]) : Transformed[B]
protected override
def
newFiltered(p : (A) => Boolean) : Transformed[A]
protected override
def
newSliced(_from : Int, _until : Int) : Transformed[A]
protected override
def
newDroppedWhile(p : (A) => Boolean) : Transformed[A]
protected override
def
newTakenWhile(p : (A) => Boolean) : Transformed[A]
override
def
stringPrefix : java.lang.String
toString
representation.
Scala Library
|
|