Scala Library
|
|
scala/collection/IterableProxyLike.scala
]
trait
IterableProxyLike[+A, +This <: IterableLike[A, This] with
Iterable[A]]
extends
IterableLike[A, This] with
TraversableProxyLike[A, This]Method Summary | |
override def
|
dropRight
(n : Int) : This
Returns the iterable wihtout its rightmost
n elements. |
override def
|
foldRight
[B](z : B)(op : (A, B) => B) : B
Combines the elements of this iterable together using the binary
function
f , from right to left, and starting with
the value z . |
override def
|
foreach
[U](f : (A) => U) : Unit
Apply a function
f to all elements of this
iterable object. |
override def
|
head
: A
The first element of this iterable.
|
override def
|
isEmpty
: Boolean
Does this iterable contain no elements?
|
override def
|
iterator
: Iterator[A]
Creates a new iterator over all elements contained in this
iterable object.
|
override def
|
reduceRight
[B >: A](op : (A, B) => B) : B
Combines the elements of this iterable object together using the binary
operator
op , from right to left |
override def
|
sameElements
[B >: A](that : Iterable[B]) : Boolean
Checks if the other iterable object contains the same elements as this one.
|
override def
|
takeRight
(n : Int) : This
Returns the rightmost
n elements from this iterable. |
override def
|
toIterable
: Iterable[A]
The iterable itself
|
override def
|
toStream
: Stream[A]
Returns a stream with all elements in this iterable object.
|
override def
|
view
(from : Int, until : Int) : IterableView[A, This]
A sub-iterable view starting at index `from`
and extending up to (but not including) index `until`.
|
override def
|
view
: IterableView[A, This]
Creates a view of this iterable @see IterableView
|
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 TraversableProxyLike | |
self (abstract), nonEmpty, size, hasDefiniteSize, ++, ++, map, flatMap, filter, filterNot, remove, partition, groupBy, forall, exists, count, find, foldLeft, /:, :\, reduceLeft, reduceLeftOption, reduceRightOption, headOption, tail, last, lastOption, init, take, drop, slice, takeWhile, dropWhile, span, splitAt, copyToBuffer, copyToArray, copyToArray, toArray, toList, toSeq, toSet, mkString, mkString, mkString, addString, addString, addString, stringPrefix |
Methods inherited from Proxy | |
hashCode, equals, toString |
Methods inherited from IterableLike | |
thisCollection, toCollection, elements, canEqual, first, firstOption, projection |
Methods inherited from TraversableLike | |
newBuilder (abstract), repr, partialMap, sum, product, min, max, toIndexedSeq, withFilter |
Methods inherited from AnyRef | |
getClass, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
f
to all elements of this
iterable object.f -
A function that is applied for its side-effect to every element. The result (of arbitrary type U) of function `f` is discarded.override
def
isEmpty : Boolean
f
, from right to left, and starting with
the value z
.f(a0, f(a1, f(..., f(an, z)...)))
if the iterable is [a0, a1, ..., an]
.op
, from right to leftop -
The operator to applya0 op (... op (an-1 op an)...)
if the iterable object has elements a0, a1, ...,
an
.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
.override
def
head : A
n
elements from this iterable.n -
the number of elements to taken
elements.n -
the number of elements to takethat -
the other iterableoverride
def
view : IterableView[A, This]
override
def
view(from : Int, until : Int) : IterableView[A, This]
from -
The index of the first element of the sliceuntil -
The index of the element following the slice
Scala Library
|
|