scala.collection.JavaConversions
A class supporting filtered operations.
[use case] Concatenates this iterable collection with the elements of a traversable collection.
Concatenates this iterable collection with the elements of a traversable collection.
Applies a binary operator to a start value and all elements of this iterable collection, going left to right.
Applies a binary operator to all elements of this iterable collection and a start value, going right to left.
Appends all elements of this iterable collection to a string builder.
Appends all elements of this iterable collection to a string builder using a separator string.
Appends all elements of this iterable collection to a string builder using start, end, and separator strings.
Method called from equality methods, so that user-defined subclasses can refuse to be equal to other collections of the same kind.
[use case] Builds a new collection by applying a partial function to all elements of this iterable collection on which the function is defined.
Builds a new collection by applying a partial function to all elements of this iterable collection on which the function is defined.
The factory companion object that builds instances of class Iterable.
[use case] Copies elements of this iterable collection to an array.
Copies elements of this iterable collection to an array.
[use case] Copies values of this iterable collection to an array.
Copies values of this iterable collection to an array.
[use case] Copies values of this iterable collection to an array.
Copies values of this iterable collection to an array.
Copies all elements of this iterable collection to a buffer.
Counts the number of elements in the iterable collection which satisfy a predicate.
Selects all elements except first n ones.
Selects all elements except last n ones.
Drops longest prefix of elements that satisfy a predicate.
The equality method defined in AnyRef
.
Tests whether a predicate holds for some of the elements of this iterable collection.
Selects all elements of this iterable collection which satisfy a predicate.
Selects all elements of this iterable collection which do not satisfy a predicate.
Finds the first element of the iterable collection satisfying a predicate, if any.
None
if iterable is empty.
[use case] Builds a new collection by applying a function to all elements of this iterable collection and concatenating the results.
Builds a new collection by applying a function to all elements of this iterable collection and concatenating the results.
[use case] Converts this iterable collection of traversable collections into a iterable collection in which all element collections are concatenated.
Converts this iterable collection of traversable collections into a iterable collection in which all element collections are concatenated.
Applies a binary operator to a start value and all elements of this iterable collection, going left to right.
Applies a binary operator to all elements of this iterable collection and a start value, going right to left.
Tests whether a predicate holds for all elements of this iterable collection.
[use case] Applies a function f
to all elements of this iterable collection.
Applies a function f
to all elements of this iterable collection.
The generic builder that builds instances of Iterable at arbitrary element types.
Partitions this iterable collection into a map of iterable collections according to some discriminator function.
Partitions elements in fixed size iterable collections.
Tests whether this iterable collection is known to have a finite size.
Returns a hash code value for the object.
Selects the first element of this iterable collection.
Optionally selects the first element.
Selects all elements except the last.
Tests whether this iterable collection is empty.
Tests whether this iterable collection can be repeatedly traversed.
Creates a new iterator over all elements contained in this iterable object.
Selects the last element.
Optionally selects the last element.
[use case] Builds a new collection by applying a function to all elements of this iterable collection.
Builds a new collection by applying a function to all elements of this iterable collection.
[use case] Finds the largest element.
Finds the largest element.
[use case] Finds the smallest element.
Finds the smallest element.
Displays all elements of this iterable collection in a string.
Displays all elements of this iterable collection in a string using a separator string.
Displays all elements of this iterable collection in a string using start, end, and separator strings.
Tests whether the iterable collection is not empty.
Partitions this iterable collection in two iterable collections according to a predicate.
[use case] Multiplies up the elements of this collection.
Multiplies up the elements of this collection.
return k for a product A(x_1,.
def
productElement(arg0: Int): Any
For a product A(x_1,.
def
productElements: Iterator[Any]
def
productIterator: Iterator[Any]
An iterator that returns all fields of this product
def
productPrefix: String
By default the empty string.
def
projection: IterableView[A, Iterable[A]]
returns a projection that can be used to call non-strict filter
,map
, and flatMap
methods that build projections
of the collection.
def
reduceLeft[B >: A](op: (B, A) ⇒ B): B
Applies a binary operator to all elements of this iterable collection, going left to right.
def
reduceLeftOption[B >: A](op: (B, A) ⇒ B): Option[B]
Optionally applies a binary operator to all elements of this iterable collection, going left to right.
def
reduceRight[B >: A](op: (A, B) ⇒ B): B
Applies a binary operator to all elements of this iterable collection, going right to left.
def
reduceRightOption[B >: A](op: (A, B) ⇒ B): Option[B]
Optionally applies a binary operator to all elements of this iterable collection, going right to left.
def
repr: Iterable[A]
The collection of type iterable collection underlying this TraversableLike
object.
def
sameElements(that: Iterable[A]): Boolean
[use case] Checks if the other iterable collection contains the same elements in the same order as this iterable collection.
def
sameElements[B >: A](that: Iterable[B]): Boolean
Checks if the other iterable collection contains the same elements in the same order as this iterable collection.
def
scanLeft[B, That](z: B)(op: (B, A) ⇒ B)(implicit bf: CanBuildFrom[Iterable[A], B, That]): That
Produces a collection containing cummulative results of applying the operator going left to right.
def
scanRight[B, That](z: B)(op: (A, B) ⇒ B)(implicit bf: CanBuildFrom[Iterable[A], B, That]): That
Produces a collection containing cummulative results of applying the operator going right to left.
def
size: Int
The size of this iterable collection.
def
slice(from: Int, until: Int): Iterable[A]
Selects an interval of elements.
def
sliding[B >: A](size: Int, step: Int): Iterator[Iterable[A]]
def
sliding[B >: A](size: Int): Iterator[Iterable[A]]
Groups elements in fixed size blocks by passing a "sliding window"
over them (as opposed to partitioning them, as is done in grouped.
def
span(p: (A) ⇒ Boolean): (Iterable[A], Iterable[A])
Splits this iterable collection into a prefix/suffix pair according to a predicate.
def
splitAt(n: Int): (Iterable[A], Iterable[A])
Splits this iterable collection into two at a given position.
def
stringPrefix: String
Defines the prefix of this object's toString
representation.
def
sum: Int
[use case] Sums up the elements of this collection.
def
sum[B >: A](implicit num: Numeric[B]): B
Sums up the elements of this collection.
def
tail: Iterable[A]
Selects all elements except the first.
def
take(n: Int): Iterable[A]
Selects first n elements.
def
takeRight(n: Int): Iterable[A]
Selects last n elements.
def
takeWhile(p: (A) ⇒ Boolean): Iterable[A]
Takes longest prefix of elements that satisfy a predicate.
def
toArray: Array[A]
[use case] Converts this iterable collection to an array.
def
toArray[B >: A](implicit arg0: ClassManifest[B]): Array[B]
Converts this iterable collection to an array.
def
toBuffer[B >: A]: Buffer[B]
Converts this iterable collection to a mutable buffer.
def
toIndexedSeq[B >: A]: IndexedSeq[B]
Converts this iterable collection to an indexed sequence.
def
toIterable: Iterable[A]
Converts this iterable collection to an iterable collection.
def
toIterator: Iterator[A]
Returns an Iterator over the elements in this iterable collection.
def
toList: List[A]
Converts this iterable collection to a list.
def
toMap[T, U](implicit ev: <:<[A, (T, U)]): Map[T, U]
Converts this iterable collection to a map.
def
toSeq: Seq[A]
Converts this iterable collection to a sequence.
def
toSet[B >: A]: Set[B]
Converts this iterable collection to a set.
def
toStream: Stream[A]
Converts this iterable collection to a stream.
def
toString(): String
Converts this iterable collection to a string.
def
toTraversable: Traversable[A]
Converts this iterable collection to an unspecified Traversable.
def
transpose[B](implicit asTraversable: (A) ⇒ Traversable[B]): Iterable[Iterable[B]]
Transposes this iterable collection of traversable collections into
a iterable collection of iterable collections.
val
underlying: Iterable[A]
def
unzip[A1, A2](implicit asPair: (A) ⇒ (A1, A2)): (Iterable[A1], Iterable[A2])
Converts this iterable collection of pairs into two collections of the first and second
halfs of each pair.
def
view(from: Int, until: Int): IterableView[A, Iterable[A]]
Creates a non-strict view of a slice of this iterable collection.
def
view: IterableView[A, Iterable[A]]
Creates a non-strict view of this iterable collection.
def
withFilter(p: (A) ⇒ Boolean): FilterMonadic[A, Iterable[A]]
Creates a non-strict filter of this iterable collection.
def
zip[B](that: Iterable[B]): Iterable[(A, B)]
[use case] Returns a iterable collection formed from this iterable collection and another iterable collection
by combining corresponding elements in pairs.
def
zip[A1 >: A, B, That](that: Iterable[B])(implicit bf: CanBuildFrom[Iterable[A], (A1, B), That]): That
Returns a iterable collection formed from this iterable collection and another iterable collection
by combining corresponding elements in pairs.
def
zipAll[B](that: Iterable[B], thisElem: A, thatElem: B): Iterable[(A, B)]
[use case] Returns a iterable collection formed from this iterable collection and another iterable collection
by combining corresponding elements in pairs.
def
zipAll[B, A1 >: A, That](that: Iterable[B], thisElem: A1, thatElem: B)(implicit bf: CanBuildFrom[Iterable[A], (A1, B), That]): That
Returns a iterable collection formed from this iterable collection and another iterable collection
by combining corresponding elements in pairs.
def
zipWithIndex: Iterable[(A, Int)]
[use case] Zips this iterable collection with its indices.
def
zipWithIndex[A1 >: A, That](implicit bf: CanBuildFrom[Iterable[A], (A1, Int), That]): That
Zips this iterable collection with its indices.