| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |/ /
| |/| | |
|
|/ / /
| | |
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | | |
SI-8561 named subclasses for known Manifest / ClassTag instances
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
This helps keeping ClassTag serialization stable under accidental
changes (like changing the order of definitions, which would change the
name of the anonymous classes).
|
|\ \ \
| | | |
| | | | |
If Range is sealed, it makes sense to have Range.Inclusive final.
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
Right-bias Either
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- 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.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | | |
|
|\ \ \ \
| |_|_|/
|/| | | |
SI-9817 immutable queue `forall` and `exists` implementations
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | | |
SI-9817 Immutable queue formatting
SI-9817 Added comments
SI-9817 Comment formatting
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| | |
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 2.11 to 2.12 [ci: last-only]
|
| |\ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | |\ \
| | | | |
| | | | | |
SI 9766 - allow ++ on empty ConcatIterator
|
| | | | | |
|
| |\| | | |
|
| | |/ /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | | |
Includes tests to verify the toString representations.
|
|\ \ \ \
| |/ / /
|/| | | |
Privatize the deprecated members of `immutable.Range`.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
`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.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | | |
Improvements to deprecations related to `since` parameter
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
SI-9382 Privatize enhanced x in Tuple2Zipped.Ops
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Consolated JUnit tests and heeded comment about private def and
code beauty.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | | |
This matches the use of ${..} in Console.
|
|\ \ \ \
| | | | |
| | | | | |
Added applyOrElse to MapLike
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This overrides default implementation from PartialFunction which used
both contains(x) and get(x) with getOrElse.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix Scaladoc link syntax on java.util.Formatter references
|
| | |/ / /
| |/| | | |
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
SI-9522 release key reference when deleting from OpenHashMap
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
SI-9656 Distinguish Numeric with step type
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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).
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-9776 Fix type of PriorityQueue.newBuilder and improve performance
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- 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.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Improve Future documentation (+ minor code cleanups)
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* Enhanced Scaladocs with groupings and clarifications
* traverse now runs the last step like sequence
* A few minor non-semantic changes to method implementations
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- 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
|