diff options
author | mpociecha <michal.pociecha@gmail.com> | 2014-12-13 16:57:54 +0100 |
---|---|---|
committer | mpociecha <michal.pociecha@gmail.com> | 2014-12-14 12:44:58 +0100 |
commit | 549dc880c5525e3a2f3ea6af35c7ae8a349b2bdc (patch) | |
tree | e3e40e3559e0f80f5dbed5b935937ab198d45e74 /src/library | |
parent | d9f623db0ff1d20040939fbb9e15d4d4e5887c75 (diff) | |
download | scala-549dc880c5525e3a2f3ea6af35c7ae8a349b2bdc.tar.gz scala-549dc880c5525e3a2f3ea6af35c7ae8a349b2bdc.tar.bz2 scala-549dc880c5525e3a2f3ea6af35c7ae8a349b2bdc.zip |
Fix many typos in docs and comments
This commit corrects many typos found in scaladocs, comments and
documentation. It should reduce a bit number of PRs which fix one
typo.
There are no changes in the 'real' code except one corrected name of
a JUnit test method and some error messages in exceptions. In the case
of typos in other method or field names etc., I just skipped them.
Obviously this commit doesn't fix all existing typos. I just generated
in IntelliJ the list of potential typos and looked through it quickly.
Diffstat (limited to 'src/library')
23 files changed, 31 insertions, 31 deletions
diff --git a/src/library/scala/Option.scala b/src/library/scala/Option.scala index 41224f4c6c..f134f5ce3d 100644 --- a/src/library/scala/Option.scala +++ b/src/library/scala/Option.scala @@ -125,8 +125,8 @@ sealed abstract class Option[+A] extends Product with Serializable { * Although the use of null is discouraged, code written to use * $option must often interface with code that expects and returns nulls. * @example {{{ - * val initalText: Option[String] = getInitialText - * val textField = new JComponent(initalText.orNull,20) + * val initialText: Option[String] = getInitialText + * val textField = new JComponent(initialText.orNull,20) * }}} */ @inline final def orNull[A1 >: A](implicit ev: Null <:< A1): A1 = this getOrElse ev(null) diff --git a/src/library/scala/collection/GenSeqLike.scala b/src/library/scala/collection/GenSeqLike.scala index 1c4f233e22..cf1de0c8e6 100644 --- a/src/library/scala/collection/GenSeqLike.scala +++ b/src/library/scala/collection/GenSeqLike.scala @@ -397,7 +397,7 @@ trait GenSeqLike[+A, +Repr] extends Any with GenIterableLike[A, Repr] with Equal * @inheritdoc * * Another way to express this - * is that `xs union ys` computes the order-presevring multi-set union of `xs` and `ys`. + * is that `xs union ys` computes the order-preserving multi-set union of `xs` and `ys`. * `union` is hence a counter-part of `diff` and `intersect` which also work on multi-sets. * * $willNotTerminateInf diff --git a/src/library/scala/collection/Iterator.scala b/src/library/scala/collection/Iterator.scala index 20712f918c..0783beac0f 100644 --- a/src/library/scala/collection/Iterator.scala +++ b/src/library/scala/collection/Iterator.scala @@ -479,7 +479,7 @@ trait Iterator[+A] extends TraversableOnce[A] { } } - /** Produces a collection containing cummulative results of applying the + /** Produces a collection containing cumulative results of applying the * operator going left to right. * * $willNotTerminateInf @@ -502,8 +502,8 @@ trait Iterator[+A] extends TraversableOnce[A] { } else Iterator.empty.next() } - /** Produces a collection containing cummulative results of applying the operator going right to left. - * The head of the collection is the last cummulative result. + /** Produces a collection containing cumulative results of applying the operator going right to left. + * The head of the collection is the last cumulative result. * * $willNotTerminateInf * $orderDependent diff --git a/src/library/scala/collection/LinearSeqOptimized.scala b/src/library/scala/collection/LinearSeqOptimized.scala index 64248aa755..9c336e8e31 100755 --- a/src/library/scala/collection/LinearSeqOptimized.scala +++ b/src/library/scala/collection/LinearSeqOptimized.scala @@ -44,7 +44,7 @@ trait LinearSeqOptimized[+A, +Repr <: LinearSeqOptimized[A, Repr]] extends Linea * * $willNotTerminateInf * - * Note: the execution of `length` may take time proportial to the length of the sequence. + * Note: the execution of `length` may take time proportional to the length of the sequence. */ def length: Int = { var these = self @@ -57,7 +57,7 @@ trait LinearSeqOptimized[+A, +Repr <: LinearSeqOptimized[A, Repr]] extends Linea } /** Selects an element by its index in the $coll. - * Note: the execution of `apply` may take time proportial to the index value. + * Note: the execution of `apply` may take time proportional to the index value. * @throws IndexOutOfBoundsException if `idx` does not satisfy `0 <= idx < length`. */ def apply(n: Int): A = { diff --git a/src/library/scala/collection/immutable/HashSet.scala b/src/library/scala/collection/immutable/HashSet.scala index e4b7371ed4..f548eac88d 100644 --- a/src/library/scala/collection/immutable/HashSet.scala +++ b/src/library/scala/collection/immutable/HashSet.scala @@ -406,7 +406,7 @@ object HashSet extends ImmutableSetFactory[HashSet] { // create a new HashSet1 with the hash we already know new HashSet1(ks1.head, hash) case _ => - // create a new HashSetCollison with the hash we already know and the new keys + // create a new HashSetCollision with the hash we already know and the new keys new HashSetCollision1(hash, ks1) } } @@ -426,7 +426,7 @@ object HashSet extends ImmutableSetFactory[HashSet] { // create a new HashSet1 with the hash we already know new HashSet1(ks1.head, hash) case _ => - // create a new HashSetCollison with the hash we already know and the new keys + // create a new HashSetCollision with the hash we already know and the new keys new HashSetCollision1(hash, ks1) } } @@ -445,7 +445,7 @@ object HashSet extends ImmutableSetFactory[HashSet] { // Should only have HSC1 if size > 1 this case _ => - // create a new HashSetCollison with the hash we already know and the new keys + // create a new HashSetCollision with the hash we already know and the new keys new HashSetCollision1(hash, ks1) } } else this diff --git a/src/library/scala/collection/immutable/Stream.scala b/src/library/scala/collection/immutable/Stream.scala index 09a69b8096..9ed5162061 100644 --- a/src/library/scala/collection/immutable/Stream.scala +++ b/src/library/scala/collection/immutable/Stream.scala @@ -944,7 +944,7 @@ self => * * @param p the test predicate. * @return A new `Stream` representing the results of applying `p` to the - * oringal `Stream`. + * original `Stream`. * * @example {{{ * // Assume we have a Stream that takes the first 20 natural numbers diff --git a/src/library/scala/collection/mutable/DoubleLinkedList.scala b/src/library/scala/collection/mutable/DoubleLinkedList.scala index 671b79f8c2..fd95e74fbc 100644 --- a/src/library/scala/collection/mutable/DoubleLinkedList.scala +++ b/src/library/scala/collection/mutable/DoubleLinkedList.scala @@ -41,7 +41,7 @@ import generic._ * @define mayNotTerminateInf * @define willNotTerminateInf */ -@deprecated("Low-level linked lists are deprecated due to idiosyncracies in interface and incomplete features.", "2.11.0") +@deprecated("Low-level linked lists are deprecated due to idiosyncrasies in interface and incomplete features.", "2.11.0") @SerialVersionUID(-8144992287952814767L) class DoubleLinkedList[A]() extends AbstractSeq[A] with LinearSeq[A] diff --git a/src/library/scala/collection/mutable/DoubleLinkedListLike.scala b/src/library/scala/collection/mutable/DoubleLinkedListLike.scala index a43fe34c99..aafe34f50a 100644 --- a/src/library/scala/collection/mutable/DoubleLinkedListLike.scala +++ b/src/library/scala/collection/mutable/DoubleLinkedListLike.scala @@ -56,10 +56,10 @@ import scala.annotation.migration * @define Coll `DoubleLinkedList` * @define coll double linked list */ -@deprecated("Low-level linked lists are deprecated due to idiosyncracies in interface and incomplete features.", "2.11.0") +@deprecated("Low-level linked lists are deprecated due to idiosyncrasies in interface and incomplete features.", "2.11.0") trait DoubleLinkedListLike[A, This <: Seq[A] with DoubleLinkedListLike[A, This]] extends SeqLike[A, This] with LinkedListLike[A, This] { self => - /** A reference to the node in the linked list preceeding the current node. */ + /** A reference to the node in the linked list preceding the current node. */ var prev: This = _ // returns that list if this list is empty diff --git a/src/library/scala/collection/mutable/LinkedList.scala b/src/library/scala/collection/mutable/LinkedList.scala index 092698ac0b..b3500367af 100644 --- a/src/library/scala/collection/mutable/LinkedList.scala +++ b/src/library/scala/collection/mutable/LinkedList.scala @@ -76,7 +76,7 @@ import generic._ * }}} */ @SerialVersionUID(-7308240733518833071L) -@deprecated("Low-level linked lists are deprecated due to idiosyncracies in interface and incomplete features.", "2.11.0") +@deprecated("Low-level linked lists are deprecated due to idiosyncrasies in interface and incomplete features.", "2.11.0") class LinkedList[A]() extends AbstractSeq[A] with LinearSeq[A] with GenericTraversableTemplate[A, LinkedList] diff --git a/src/library/scala/collection/mutable/LinkedListLike.scala b/src/library/scala/collection/mutable/LinkedListLike.scala index 987b83d23b..a9d385bc5b 100644 --- a/src/library/scala/collection/mutable/LinkedListLike.scala +++ b/src/library/scala/collection/mutable/LinkedListLike.scala @@ -55,7 +55,7 @@ import scala.annotation.tailrec * * }}} */ -@deprecated("Low-level linked lists are deprecated due to idiosyncracies in interface and incomplete features.", "2.11.0") +@deprecated("Low-level linked lists are deprecated due to idiosyncrasies in interface and incomplete features.", "2.11.0") trait LinkedListLike[A, This <: Seq[A] with LinkedListLike[A, This]] extends SeqLike[A, This] { self => var elem: A = _ diff --git a/src/library/scala/collection/mutable/LongMap.scala b/src/library/scala/collection/mutable/LongMap.scala index 5fafe23d9f..c124f35cd7 100644 --- a/src/library/scala/collection/mutable/LongMap.scala +++ b/src/library/scala/collection/mutable/LongMap.scala @@ -19,7 +19,7 @@ import generic.CanBuildFrom * on a map that will no longer have elements removed but will be * used heavily may save both time and storage space. * - * This map is not indended to contain more than 2^29 entries (approximately + * This map is not intended to contain more than 2^29 entries (approximately * 500 million). The maximum capacity is 2^30, but performance will degrade * rapidly as 2^30 is approached. * diff --git a/src/library/scala/collection/mutable/MapLike.scala b/src/library/scala/collection/mutable/MapLike.scala index 471cd1cdde..af28df1b88 100644 --- a/src/library/scala/collection/mutable/MapLike.scala +++ b/src/library/scala/collection/mutable/MapLike.scala @@ -133,7 +133,7 @@ trait MapLike[A, B, +This <: MapLike[A, B, This] with Map[A, B]] /** Creates a new map containing the key/value mappings provided by the specified traversable object * and all the key/value mappings of this map. * - * Note that existing mappings from this map with the same key as those in `xs` will be overriden. + * Note that existing mappings from this map with the same key as those in `xs` will be overridden. * * @param xs the traversable object. * @return a new map containing mappings of this map and those provided by `xs`. diff --git a/src/library/scala/collection/mutable/OpenHashMap.scala b/src/library/scala/collection/mutable/OpenHashMap.scala index aade2ed6fb..24f5761cf5 100644 --- a/src/library/scala/collection/mutable/OpenHashMap.scala +++ b/src/library/scala/collection/mutable/OpenHashMap.scala @@ -31,7 +31,7 @@ object OpenHashMap { /** A mutable hash map based on an open hashing scheme. The precise scheme is * undefined, but it should make a reasonable effort to ensure that an insert - * with consecutive hash codes is not unneccessarily penalised. In particular, + * with consecutive hash codes is not unnecessarily penalised. In particular, * mappings of consecutive integer keys should work without significant * performance loss. * diff --git a/src/library/scala/collection/package.scala b/src/library/scala/collection/package.scala index 26b061b2a5..6a2b6de75a 100644 --- a/src/library/scala/collection/package.scala +++ b/src/library/scala/collection/package.scala @@ -18,7 +18,7 @@ package scala * * == Using Collections == * - * It is convienient to treat all collections as either + * It is convenient to treat all collections as either * a [[scala.collection.Traversable]] or [[scala.collection.Iterable]], as * these traits define the vast majority of operations * on a collection. diff --git a/src/library/scala/collection/parallel/ParIterableLike.scala b/src/library/scala/collection/parallel/ParIterableLike.scala index 2b54e05841..016255dca4 100644 --- a/src/library/scala/collection/parallel/ParIterableLike.scala +++ b/src/library/scala/collection/parallel/ParIterableLike.scala @@ -744,7 +744,7 @@ self: ParIterableLike[T, Repr, Sequential] => * The index flag is initially set to maximum integer value. * * @param pred the predicate used to test the elements - * @return the longest prefix of this $coll of elements that satisy the predicate `pred` + * @return the longest prefix of this $coll of elements that satisfy the predicate `pred` */ def takeWhile(pred: T => Boolean): Repr = { val cbf = combinerFactory diff --git a/src/library/scala/collection/parallel/package.scala b/src/library/scala/collection/parallel/package.scala index 91c54fa8f1..d77dcb0658 100644 --- a/src/library/scala/collection/parallel/package.scala +++ b/src/library/scala/collection/parallel/package.scala @@ -206,7 +206,7 @@ package parallel { * Methods `beforeCombine` and `afterCombine` are called before and after * combining the buckets, respectively, given that the argument to `combine` * is not `this` (as required by the `combine` contract). - * They can be overriden in subclasses to provide custom behaviour by modifying + * They can be overridden in subclasses to provide custom behaviour by modifying * the receiver (which will be the return value). */ private[parallel] abstract class BucketCombiner[-Elem, +To, Buck, +CombinerType <: BucketCombiner[Elem, To, Buck, CombinerType]] diff --git a/src/library/scala/concurrent/Future.scala b/src/library/scala/concurrent/Future.scala index e93a3284dc..914646320c 100644 --- a/src/library/scala/concurrent/Future.scala +++ b/src/library/scala/concurrent/Future.scala @@ -485,7 +485,7 @@ object Future { * The result becomes available once the asynchronous computation is completed. * * @tparam T the type of the result - * @param body the asychronous computation + * @param body the asynchronous computation * @param executor the execution context on which the future is run * @return the `Future` holding the result of the computation */ diff --git a/src/library/scala/concurrent/SyncVar.scala b/src/library/scala/concurrent/SyncVar.scala index 494c955833..9634f6d900 100644 --- a/src/library/scala/concurrent/SyncVar.scala +++ b/src/library/scala/concurrent/SyncVar.scala @@ -93,7 +93,7 @@ class SyncVar[A] { // [Heather] the reason why: it doesn't take into consideration // whether or not the SyncVar is already defined. So, set has been // deprecated in order to eventually be able to make "setting" private - @deprecated("Use `put` instead, as `set` is potentionally error-prone", "2.10.0") + @deprecated("Use `put` instead, as `set` is potentially error-prone", "2.10.0") // NOTE: Used by SBT 0.13.0-M2 and below def set(x: A): Unit = setVal(x) @@ -113,7 +113,7 @@ class SyncVar[A] { // [Heather] the reason why: it doesn't take into consideration // whether or not the SyncVar is already defined. So, unset has been // deprecated in order to eventually be able to make "unsetting" private - @deprecated("Use `take` instead, as `unset` is potentionally error-prone", "2.10.0") + @deprecated("Use `take` instead, as `unset` is potentially error-prone", "2.10.0") // NOTE: Used by SBT 0.13.0-M2 and below def unset(): Unit = synchronized { isDefined = false diff --git a/src/library/scala/io/StdIn.scala b/src/library/scala/io/StdIn.scala index 64836ecd6e..0f9656436b 100644 --- a/src/library/scala/io/StdIn.scala +++ b/src/library/scala/io/StdIn.scala @@ -4,7 +4,7 @@ package io import java.text.MessageFormat /** private[scala] because this is not functionality we should be providing - * in the standard library, at least not in this idiosyncractic form. + * in the standard library, at least not in this idiosyncratic form. * Factored into trait because it is better code structure regardless. */ private[scala] trait StdIn { diff --git a/src/library/scala/math/BigDecimal.scala b/src/library/scala/math/BigDecimal.scala index 74a174ea74..cf95f945ba 100644 --- a/src/library/scala/math/BigDecimal.scala +++ b/src/library/scala/math/BigDecimal.scala @@ -364,7 +364,7 @@ object BigDecimal { * to a decimal text representation, and build a `BigDecimal` based on that. * `BigDecimal.binary` will expand the binary fraction to the requested or default * precision. `BigDecimal.exact` will expand the binary fraction to the - * full number of digits, thus producing the exact decimal value corrsponding to + * full number of digits, thus producing the exact decimal value corresponding to * the binary fraction of that floating-point number. `BigDecimal` equality * matches the decimal expansion of `Double`: `BigDecimal.decimal(0.1) == 0.1`. * Note that since `0.1f != 0.1`, the same is not true for `Float`. Instead, diff --git a/src/library/scala/runtime/MethodCache.scala b/src/library/scala/runtime/MethodCache.scala index 2d5f832e1f..a8fdfc1059 100644 --- a/src/library/scala/runtime/MethodCache.scala +++ b/src/library/scala/runtime/MethodCache.scala @@ -16,7 +16,7 @@ import java.lang.{ Class => JClass } import scala.annotation.tailrec /** An element of a polymorphic object cache. - * This class is refered to by the `CleanUp` phase. Each `PolyMethodCache` chain + * This class is referred to by the `CleanUp` phase. Each `PolyMethodCache` chain * must only relate to one method as `PolyMethodCache` does not identify * the method name and argument types. In practice, one variable will be * generated per call point, and will uniquely relate to the method called diff --git a/src/library/scala/runtime/ScalaRunTime.scala b/src/library/scala/runtime/ScalaRunTime.scala index f50059ce54..18fcbf8276 100644 --- a/src/library/scala/runtime/ScalaRunTime.scala +++ b/src/library/scala/runtime/ScalaRunTime.scala @@ -251,7 +251,7 @@ object ScalaRunTime { * * The primary motivation for this method is to provide a means for * correctly obtaining a String representation of a value, while - * avoiding the pitfalls of naïvely calling toString on said value. + * avoiding the pitfalls of naively calling toString on said value. * In particular, it addresses the fact that (a) toString cannot be * called on null and (b) depending on the apparent type of an * array, toString may or may not print it in a human-readable form. diff --git a/src/library/scala/sys/process/package.scala b/src/library/scala/sys/process/package.scala index 1340a6c415..b1976ad4b6 100644 --- a/src/library/scala/sys/process/package.scala +++ b/src/library/scala/sys/process/package.scala @@ -119,7 +119,7 @@ package scala.sys { * ==Handling Input and Output== * * In the underlying Java model, once a `Process` has been started, one can - * get `java.io.InputStream` and `java.io.OutpuStream` representing its + * get `java.io.InputStream` and `java.io.OutputStream` representing its * output and input respectively. That is, what one writes to an * `OutputStream` is turned into input to the process, and the output of a * process can be read from an `InputStream` -- of which there are two, one |