summaryrefslogtreecommitdiff
path: root/src/library
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | Deprecated and rename Some#x to Some#valueDale Wijnand2016-07-151-2/+4
| | |/ / | |/| |
* / | | SI-9691 BufferedIterator should expose a headOptionChristopher Davenport2016-07-151-0/+6
|/ / / | | | | | | | | | This exposes a new API to the BufferedIterator trait. It will return the next element of an iterator as an Option. The return will be Some(value) if there is a next value, and None if there is not a next element.
* | | Merge pull request #5264 from lrytz/t8561Lukas Rytz2016-07-132-48/+69
|\ \ \ | | | | | | | | SI-8561 named subclasses for known Manifest / ClassTag instances
| * | | SI-8561 named subclasses for known Manifest / ClassTag instancesLukas Rytz2016-07-062-48/+69
| |/ / | | | | | | | | | | | | | | | This helps keeping ClassTag serialization stable under accidental changes (like changing the order of definitions, which would change the name of the anonymous classes).
* | | Merge pull request #5226 from Arneball/sealednessLukas Rytz2016-07-131-1/+1
|\ \ \ | | | | | | | | If Range is sealed, it makes sense to have Range.Inclusive final.
| * | | If Range is sealed, it makes sense to have Range.Inclusive final.Raul Bache2016-06-121-1/+1
| | |/ | |/|
* | | Merge pull request #5135 from soc/topic/biased-eitherStefan Zeiger2016-07-131-76/+236
|\ \ \ | | | | | | | | Right-bias Either
| * | | [squash] Fix bounds in containsSimon Ochsenreither2016-07-071-1/+1
| | | |
| * | | Right-bias EitherSimon Ochsenreither2016-05-271-76/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add operations like map, flatMap which assume right-bias - Deprecate {Left,Right}Projection - Deprecate left and right in favor of swap - Add contains, toOption, toTry, toSeq and filterOrElse - toSeq returns collection.immutable.Seq instead of collection.Seq - Don't add get There are no incompatible changes. The only possibility of breakage that exists is when people have added extension methods named map, flatMap etc. to Either in the past doing something different than the methods added to Either now. One detail that moved the scales in favor of deprecating LeftProjection and RightProjection was the desire to have toSeq return scala.collection.immutable.Seq instead of scala.collection.Seq like LeftProjection and RightProjection do. Therefore keeping LeftProjection and RightProjection would introduce inconsistency. filter is called filterOrElse because filtering in a for-comprehension doesn't work if the method needs an explicit argument. contains was added as safer alternative to if (either.isRight && either.right.get == $something) ... While adding filter with an implicit zero value is possible, it's dangerous as it would require that developers add a "naked" implicit value of type A to their scope and it would close the door to a future in which the Scala standard library ships with Monoid and filter could exist with an implicit Monoid parameter.
* | | | Group math package functionsJanek Bogucki2016-07-061-64/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Groups - Mathematical Constants - Minimum and Maximum - Rounding - Exponential and Logarithmic - Trigonometric - Angular Measurement Conversion - Hyperbolic - Absolute Values - Signs - Root Extraction - Polar Coordindates - Unit of Least Precision Other changes, - Dropped use of `double` for `Double` in all cases - Grouped some methods in the source - Extended notes about exception to method forwarding - Minor method documentation enhancements IEEERemainder is in the Rounding group since it is related to rounding and did not justify a new group.
* | | | Fixed a typo in PredefJanek Bogucki2016-07-061-1/+1
| | | |
* | | | Merge pull request #5228 from dpogretskiy/SI-9817Adriaan Moors2016-07-051-0/+8
|\ \ \ \ | |_|_|/ |/| | | SI-9817 immutable queue `forall` and `exists` implementations
| * | | SI-9817 forall and existsDmitriy Pogretskiy2016-06-201-0/+8
| | |/ | |/| | | | | | | | | | | | | | | | | | | SI-9817 Immutable queue formatting SI-9817 Added comments SI-9817 Comment formatting
* / | Fix ParVector#padToJason Zaugg2016-06-281-1/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was throwing a UnsupportedOperationError for small operations. The parallel collections test suite sets `-minSuccessfulTests 5` in test/files/scalacheck/parallel-collections/pc.scala, which is far lower thatn the default of 100, and means that we are less likely to falsify properties. This parameter seems to have been added in #2476, assuming I'm reading it correctly. Not sure of the motiviation, perhaps just to make the slowest part of the scalacheck test suite run faster? I haven't changed the paramater now, but instead have included a one element collection in generator. I also found that when the test failed, Scalacheck would try to minimize the example, but did so assuming that the elements of the tuple of test data could be independentally shrunk. This breaks the invariant that the two collections contain equal elements, and led to spurious error reports. I have disabled shrinking in all tests tests affected by this.
* | Prohibit @native method in traitAdriaan Moors2016-06-021-3/+6
| | | | | | | | | | | | | | On the JVM, a @native interface method results in a VerifyError. Other platforms could decide to be more permissive, but it seems like allowing them in classes is enough.
* | Merge pull request #5203 from lrytz/merge-2.11-to-2.12-june-1Lukas Rytz2016-06-022-12/+7
|\ \ | | | | | | Merge 2.11 to 2.12 [ci: last-only]
| * \ Merge commit '90215ce' into merge-2.11-to-2.12-june-1Lukas Rytz2016-06-011-11/+6
| |\ \
| | * | SI-9789 use quadratic probing in OpenHashMapPerformant Data LLC2016-05-261-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original probe sequence, taken from Python's hash table code, is exponential, jumping around in the hash table with poor memory locality. This replaces the probe algorithm with the more conventional quadratic probing. This also adds tests to the benchmarking code using AnyRef keys, which have pseudorandom hash codes (unlike Ints, whose hash code is simply the Int itself). The intensity of the benchmarking is reduced to make the tests complete within 9 hours, by removing unnecessary sampling.
| | * | Merge pull request #5167 from martijnhoekstra/SI-9766Lukas Rytz2016-05-231-1/+2
| | |\ \ | | | | | | | | | | SI 9766 - allow ++ on empty ConcatIterator
| | | * | SI-9766 - allow ++ on empty ConcatIteratorMartijn Hoekstra2016-05-211-1/+2
| | | | |
| * | | | Merge commit '4196569' into merge-2.11-to-2.12-june-1Lukas Rytz2016-06-011-1/+1
| |\| | |
| | * | | SI-9688 Make merge in immutable HashMap1 work with null kv.Łukasz Gieroń2016-05-231-1/+1
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The kv field of scala.collection.immutable.HashMap.HashMap1 can be null. This commit corrects the behavior of updated0 (which is on call path for merged) to work in such cases, instead of throwing NPE. Commit contains regression test.
| | * | SI-9488 - adds the same default toString format to Scala Futures as 2.12.xViktor Klang2016-03-221-0/+4
| | | | | | | | | | | | | | | | Includes tests to verify the toString representations.
* | | | Merge pull request #5198 from sjrd/privatize-range-membersLukas Rytz2016-06-011-17/+11
|\ \ \ \ | |/ / / |/| | | Privatize the deprecated members of `immutable.Range`.
| * | | Relax the semantics of `Range.lastElement` for internal use.Sébastien Doeraene2016-05-311-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | `lastElement` is only used in code paths where the range is non-empty. It is therefore wasteful to try and give it a sort of sensible value for empty ranges.
| * | | Privatize the deprecated members of `immutable.Range`.Sébastien Doeraene2016-05-311-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of these obscure members of `Range` are uselessly complicated for the purposes of `Range` itself. Making them private will allow to relax their semantics to the specific needs of `Range`, making them simpler, together with the initialization code of `Range`. `terminalElement` becomes dead code and is removed.
* | | | SI-9767 document and test behaviour of String->integer/float conversionsMike Pheasant2016-06-011-7/+15
|/ / / | | | | | | | | | | | | | | | | | | We delegate `String`'s extension methods `toInt`, `toFloat`, etc to corresponding methods in the Java standard library. These differ in the way they handle whitespace in the original string. This commit documents and tests the current behaviour.
* | | Merge pull request #5076 from soc/topic/deprecations-sinceLukas Rytz2016-05-3088-281/+356
|\ \ \ | | | | | | | | Improvements to deprecations related to `since` parameter
| * | | Add documentation to @deprecatedSimon Ochsenreither2016-05-294-21/+101
| | | |
| * | | Add since arg to deprecationWarning and use itSimon Ochsenreither2016-05-295-18/+20
| | | |
| * | | Lower-case spelling of @deprecated messagesSimon Ochsenreither2016-05-2882-248/+243
| | | |
| * | | SI-9084 Add `since` (if available) to deprecation warningsSimon Ochsenreither2016-05-281-6/+6
| | | |
| * | | SI-9483 Add `since` to `@deprecatedName`Simon Ochsenreither2016-05-271-3/+1
| | | |
* | | | Merge pull request #5191 from som-snytt/issue/9382Lukas Rytz2016-05-302-42/+47
|\ \ \ \ | |/ / / |/| | | SI-9382 Privatize enhanced x in Tuple2Zipped.Ops
| * | | SI-9382 Zippy clean-up in aisle 2 & 3Som Snytt2016-05-262-40/+45
| | | | | | | | | | | | | | | | | | | | Consolated JUnit tests and heeded comment about private def and code beauty.
| * | | SI-9382 Privatize enhanced x in Tuple2Zipped.OpsSom Snytt2016-05-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Probably there should be an Abide rule to avoid leaking the "underlying value" of a value class. The spec or SIP defines "underlying type" but doesn't mention the underlying value. The argument for concealing the member is that it is redundant and makes autocompletion results harder to read. Also, possibly an additional implicit might want to add a member so-named.
* | | | Use full braces style in AnsiColor exampleJanek Bogucki2016-05-251-1/+1
| | | | | | | | | | | | | | | | This matches the use of ${..} in Console.
* | | | Merge pull request #5052 from kilotaras/topic/map-applyOrElseLukas Rytz2016-05-251-0/+4
|\ \ \ \ | | | | | | | | | | Added applyOrElse to MapLike
| * | | | Added applyOrElse to MapLikeTaras Boiko2016-03-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | This overrides default implementation from PartialFunction which used both contains(x) and get(x) with getOrElse.
* | | | | Merge pull request #5185 from janekdb/topic/2.12.x-scaladoc-java-link-syntaxLukas Rytz2016-05-252-6/+3
|\ \ \ \ \ | | | | | | | | | | | | Fix Scaladoc link syntax on java.util.Formatter references
| * | | | | Fix Scaladoc link syntax on java.util.Formatter referencesJanek Bogucki2016-05-242-6/+3
| | |/ / / | |/| | |
* | | | | Merge pull request #5124 from performantdata/bug/SI-9522Lukas Rytz2016-05-251-29/+54
|\ \ \ \ \ | |/ / / / |/| | | | SI-9522 release key reference when deleting from OpenHashMap
| * | | | SI-9522 release key reference when deleting from OpenHashMapPerformant Data LLC2016-05-241-29/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This sets the key field in the hash table entry to its default value when an entry is deleted, so as not to unexpectedly retain an object reference, leading to a memory leak. Also includes incidental changes to the slot location algorithm that reduce the number of deleted entries.
* | | | | Merge pull request #5175 from som-snytt/issue/9656-range-toStringStefan Zeiger2016-05-242-12/+19
|\ \ \ \ \ | |/ / / / |/| | | | SI-9656 Distinguish Numeric with step type
| * | | | SI-9656 Range.toString distinguishes Numeric stepSteve Robinson2016-05-192-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Range and NumericRange, toString will indicate the step if it is not 1. Additionally, indicate empty ranges and ranges which are not "exact". For a "mapped" range, used by `Range.Double`, toString includes the underlying range and the simple type of the step (to distinguish Double from BigDecimal).
* | | | | Merge pull request #5181 from chrisokasaki/issue/9776Adriaan Moors2016-05-231-18/+106
|\ \ \ \ \ | | | | | | | | | | | | SI-9776 Fix type of PriorityQueue.newBuilder and improve performance
| * | | | | SI-9776: Fix type of PriorityQueue.newBuilder and improve performancechrisokasaki2016-05-221-18/+106
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Fix the return type of mutable.PriorityQueue.newBuilder to be Builder[A, PriorityQueue[A]] rather than PriorityQueue[A]. - Improve performance of bulk inserts from O(N log N) to O(N), primarily in the builder, ++=, and reverse. These changes indirectly benefit the many other methods that use the builder or ++=. - Improve performance of clone. - Fix SI-9757 space leak in dequeue.
* | | | | Merge pull request #5164 from viktorklang/wip-future-docs-√Adriaan Moors2016-05-231-58/+101
|\ \ \ \ \ | | | | | | | | | | | | Improve Future documentation (+ minor code cleanups)
| * | | | | Improvements to scala.concurrent.FutureViktor Klang2016-05-201-58/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Enhanced Scaladocs with groupings and clarifications * traverse now runs the last step like sequence * A few minor non-semantic changes to method implementations
* | | | | | Group Console and AnsiColor entities and add usage examplesJanek Bogucki2016-05-232-36/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Group AnsiColor and Console members - Add Console IO redefinition examples - Add Console control code examples - Add color swatches to AnsiColor - Add AnsiColor control code examples - Link to StdIn for reading - Fix link syntax for java.util.Formatter - Fix withErr method example