summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/GenSeqLike.scala
Commit message (Collapse)AuthorAgeFilesLines
* Add scaladoc comment about the case when Exception will be thrown by ↵Kota Mizushima2016-03-241-0/+1
| | | | invocation of length method
* ScalaDoc fixes for library and library-auxJanek Bogucki2015-07-281-1/+1
|
* Add @throws annotation to GenSeqLike.updatedCody Allen2015-05-071-0/+1
| | | | | | | | Similarly to GenSeqLike.apply, GenSeqLike.updated can throw IndexOutOfBoundsException. For example, the following throws IndexOutOfBoundsException: Vector.empty[String].updated(0, "foo")
* Fix many typos in docs and commentsmpociecha2014-12-141-1/+1
| | | | | | | | | | | | | 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.
* cleanup @throws tags in library and reflectAntoine Gourlay2014-11-051-1/+1
| | | | | - there is no need for explicit links with [[ and ]] - there is no need for explicit backquoting
* Merge pull request #3335 from swartzrock/masterIchoran2014-01-121-15/+12
|\ | | | | Fixes #3330 with Scaladoc changes only
| * Fixes #3330 with Scaladoc changes onlyJason Swartz2014-01-071-15/+12
| |
* | Fix typo in documentationOlivier Blanvillain2014-01-081-1/+1
|/
* Absolutized paths involving the scala package.Paul Phillips2013-05-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Confusing, now-it-happens now-it-doesn't mysteries lurk in the darkness. When scala packages are declared like this: package scala.collection.mutable Then paths relative to scala can easily be broken via the unlucky presence of an empty (or nonempty) directory. Example: // a.scala package scala.foo class Bar { new util.Random } % scalac ./a.scala % mkdir util % scalac ./a.scala ./a.scala:4: error: type Random is not a member of package util new util.Random ^ one error found There are two ways to play defense against this: - don't use relative paths; okay sometimes, less so others - don't "opt out" of the scala package This commit mostly pursues the latter, with occasional doses of the former. I created a scratch directory containing these empty directories: actors annotation ant api asm beans cmd collection compat concurrent control convert docutil dtd duration event factory forkjoin generic hashing immutable impl include internal io logging macros man1 matching math meta model mutable nsc parallel parsing partest persistent process pull ref reflect reify remote runtime scalap scheduler script swing sys text threadpool tools transform unchecked util xml I stopped when I could compile the main src directories even with all those empties on my classpath.
* Brings all copyrights (in comments) up-to-date, from 2011/12 to 2013Heather Miller2012-11-021-1/+1
|
* Merge pull request #1308 from soc/SI-4478Josh Suereth2012-09-171-4/+4
|\ | | | | SI-4478 Replaces wrt with (hopefully) slightly improved wording.
| * SI-4478 Replaces wrt with (hopefully) slightly improved wording.Simon Ochsenreither2012-09-151-4/+4
| |
* | More relative path elimination.Paul Phillips2012-09-151-2/+2
|/ | | | | | | | | | | | | | | | Some names I missed in 55b609458fd . How one might know when one is done: mkdir scratch && cd scratch mkdir annotation beans collection compat concurrent io \ math parallel ref reflect runtime scala sys testing \ text tools util xml scalac $(find ../src/library -name '*.scala') Until recently that would fail with about a billion errors. When it compiles, that's when you're done. And that's where this commit takes us, for src/library at least.
* Add the first iteration of the `util.hashing` package.Aleksandar Prokopec2012-06-071-1/+1
| | | | | | | | | | | | | | | | | Move `MurmurHash3` to `util.hashing`. Make the `class` private and retain a public companion `object`, and put the `MurmurHash3.Hashing` implementations for various types in the companion. Add a method which composes `ByteswapHashing` with some other hashing. Rename `hashOf` to `hash`. Fix chi-square test in a test-case. Review by @jsuereth. Moved a failing test that seems to use some other library version to pending.
* Address doc comment rot in the standard library.Jason Zaugg2012-05-131-4/+0
| | | | | | | | | | | | | | | | | | | | | - Match @param/@tparam names to the actual parameter name - Use @tparam for type parameters - Whitespace is required between `*` and `@` - Fix incorrect references to @define macros. - Use of monospace `` and {{{}}} (much more needed) - Remove `@param p1 ...` stubs, which appear in the generated docss. - But, retainsed `@param p1` stubs, assuming they will be filtered from the generated docs by SI-5795. - Avoid use of the shorthand `@param doc for the solitary param` (which works, but isn't recognized by the code inspection in IntelliJ I used to sweep through the problems) The remaining warnings from `ant docs` seem spurious, I suspect they are an unintended consequence of documenting extension methods. [scaladoc] /Users/jason/code/scala/src/library/scala/collection/TraversableOnce.scala:181: warning: Variable coll undefined in comment for method reduceOption in class Tuple2Zipped [scaladoc] def reduceOption[A1 >: A](op: (A1, A1) => A1): Option[A1] = reduceLeftOption(op) [scaladoc] ^
* Removed all the imports of the bridge annotation.Paul Phillips2012-04-281-1/+0
| | | | Now that nothing uses it.
* Removes @bridge methods.Simon Ochsenreither2012-04-281-7/+0
|
* Enabling postfix ops feature warning, and working on libs to avoid them.Martin Odersky2012-04-121-3/+3
|
* Adapted usecases to full signature displayVlad Ureche2012-03-201-62/+95
|
* A first bunch of Any-extending traits.Martin Odersky2012-02-061-1/+1
|
* Add a mnemonic to help remember what's the difference between +:Daniel C. Sobral2011-12-041-0/+4
| | | | and :+, plus one for ++:.
* Refinements of "def seq" and murmurhash.Paul Phillips2011-11-241-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Trying to make hashcodes faster. Didn't achieve much on that front, so redirected into structural/consistency issues. The latter was lacking in terms of how/where "def seq" was defined. The documentation I can find doesn't give me much hint that the sequential form of my sequential collection might be a single-use iterator! (As in StringOps, ArrayOps.) If that's intentional it should be in huge letters. I'm assuming for now that it wasn't. Also, there was this: GenMapLike: def seq: Map[A, B] GenSetLike: def seq: Set[A] GenSeqLike: // nothing, returns Traversable So I added some def seqs where I needed the more specific types for my hashcode work. Hashcodewise, I broke the MurmurHash3 object into a reusable class and a collections-specific object, and I deprecated the methods which took GenTraversableOnce in favor of ones taking TraversableOnce, because there's no reason the hashcode library should have to know about things like "make sure to call seq before you traverse or you'll be sorry." Exclude things by their type and you can never make a mistake. End transmission.
* Refinement of murmurhash implementation.Paul Phillips2011-09-081-3/+8
| | | | | | Integrates recent speed improvements to algorithm. Contributed by Ruediger Keller, no review.
* - Update Scaladoc for LinkedList and for some o...Paul Phillips2011-07-291-0/+42
| | | | | | | | | | - Update Scaladoc for LinkedList and for some of the functions/operators - that it inherits. Completed Scaladoc for append Added example - in GenSeqLike for apply. Added $collectExample to collect in - GenTraversableLike and supplied an actual example in LinkedList Contributed by Donald McLean.
* 2nd round of clean ups (see r25285)michelou2011-07-151-5/+4
|
* Removing the package-private modifiers on Gen*L...Aleksandar Pokopec2011-06-221-1/+1
| | | | | | | Removing the package-private modifiers on Gen*Like traits. No review.
* Small changes to docs only. No review.Martin Odersky2011-06-201-3/+3
|
* Added a bunch of bridges to make ameliorate bin...Martin Odersky2011-04-241-0/+8
| | | | | | Added a bunch of bridges to make ameliorate binary compatibility of new collections. Review by prokopec. Review by extempore.
* Couple of fixes to the usecases in docs.Aleksandar Pokopec2011-04-151-4/+4
| | | | | No review.
* Adding some docs refactorings.Aleksandar Pokopec2011-04-141-27/+272
| | | | | | | Also, added some docs variables to Gen* traits that were missing. No review.
* Doing a little polishing on the parallel collec...Paul Phillips2011-04-141-6/+9
| | | | | | | | | | | | | Doing a little polishing on the parallel collections refactor (which overall looks like a big improvement.) I went for some simpler wording and moved a number of scaladoc tags around because the rug had been pulled out from under their feet. This leaves a lot undone, but since many of the docs need to be reworded before they can move from e.g. SeqLike to GenSeqLike, and I'm not well informed on exactly how these abstractions are being presented, I stayed in the safe zone. Review by prokopec.
* Refactoring the collections api to support diff...Aleksandar Pokopec2011-04-131-0/+162
Refactoring the collections api to support differentiation between referring to a sequential collection and a parallel collection, and to support referring to both types of collections. New set of traits Gen* are now superclasses of both their * and Par* subclasses. For example, GenIterable is a superclass of both Iterable and ParIterable. Iterable and ParIterable are not in a subclassing relation. The new class hierarchy is illustrated below (simplified, not all relations and classes are shown): TraversableOnce --> GenTraversableOnce ^ ^ | | Traversable --> GenTraversable ^ ^ | | Iterable --> GenIterable <-- ParIterable ^ ^ ^ | | | Seq --> GenSeq <-- ParSeq (the *Like, *View and *ViewLike traits have a similar hierarchy) General views extract common view functionality from parallel and sequential collections. This design also allows for more flexible extensions to the collections framework. It also allows slowly factoring out common functionality up into Gen* traits. From now on, it is possible to write this: import collection._ val p = parallel.ParSeq(1, 2, 3) val g: GenSeq[Int] = p // meaning a General Sequence val s = g.seq // type of s is Seq[Int] for (elem <- g) { // do something without guarantees on sequentiality of foreach // this foreach may be executed in parallel } for (elem <- s) { // do something with a guarantee that foreach is executed in order, sequentially } for (elem <- p) { // do something concurrently, in parallel } This also means that some signatures had to be changed. For example, method `flatMap` now takes `A => GenTraversableOnce[B]`, and `zip` takes a `GenIterable[B]`. Also, there are mutable & immutable Gen* trait variants. They have generic companion functionality.