diff options
Diffstat (limited to 'src/library/scala/collection/TraversableLike.scala')
-rw-r--r-- | src/library/scala/collection/TraversableLike.scala | 36 |
1 files changed, 1 insertions, 35 deletions
diff --git a/src/library/scala/collection/TraversableLike.scala b/src/library/scala/collection/TraversableLike.scala index a0b1430d17..32718ddf03 100644 --- a/src/library/scala/collection/TraversableLike.scala +++ b/src/library/scala/collection/TraversableLike.scala @@ -340,14 +340,6 @@ trait TraversableLike[+A, +Repr] extends Any b.result } - /** Tests whether a predicate holds for all elements of this $coll. - * - * $mayNotTerminateInf - * - * @param p the predicate used to test elements. - * @return `true` if this $coll is empty, otherwise `true` if the given predicate `p` - * holds for all elements of this $coll, otherwise `false`. - */ def forall(p: A => Boolean): Boolean = { var result = true breakable { @@ -374,15 +366,6 @@ trait TraversableLike[+A, +Repr] extends Any result } - /** Finds the first element of the $coll satisfying a predicate, if any. - * - * $mayNotTerminateInf - * $orderDependent - * - * @param p the predicate used to test elements. - * @return an option value containing the first element in the $coll - * that satisfies `p`, or `None` if none exists. - */ def find(p: A => Boolean): Option[A] = { var result: Option[A] = None breakable { @@ -594,23 +577,6 @@ trait TraversableLike[+A, +Repr] extends Any */ def inits: Iterator[Repr] = iterateUntilEmpty(_.init) - /** Copies elements of this $coll to an array. - * Fills the given array `xs` with at most `len` elements of - * this $coll, starting at position `start`. - * Copying will stop once either the end of the current $coll is reached, - * or the end of the array is reached, or `len` elements have been copied. - * - * @param xs the array to fill. - * @param start the starting index. - * @param len the maximal number of elements to copy. - * @tparam B the type of the elements of the array. - * - * - * @usecase def copyToArray(xs: Array[A], start: Int, len: Int): Unit - * @inheritdoc - * - * $willNotTerminateInf - */ def copyToArray[B >: A](xs: Array[B], start: Int, len: Int) { var i = start val end = (start + len) min xs.length @@ -625,7 +591,7 @@ trait TraversableLike[+A, +Repr] extends Any @deprecatedOverriding("Enforce contract of toTraversable that if it is Traversable it returns itself.", "2.11.0") def toTraversable: Traversable[A] = thisCollection - + def toIterator: Iterator[A] = toStream.iterator def toStream: Stream[A] = toBuffer.toStream // Override to provide size hint. |