Stanislav Erokhin
457918a6dd
Changed name resolution for dynamic extension. Added annotation DynamicExtension.
2016-12-14 21:36:26 +03:00
Ilya Gorbunov
bc944961f1
Use internal published-api function to validate radix in string-number conversion functions.
...
#KT-8286
2016-12-14 17:20:44 +03:00
Mikhail Zarechenskiy
c15c00677e
Add operator 'rem' as extension to BigDecimal
...
Deprecate 'mod' operator
2016-12-14 15:29:00 +03:00
Mikhail Zarechenskiy
5a829809d9
Add operator 'rem' as extension to BigInteger
...
#KT-14650 Fixed
Note that after this change behaviour of '%' on BigInteger is changed,
now it works like a proper remainder
2016-12-14 15:29:00 +03:00
Mikhael Bogdanov
95a47e56f7
InlineExposed usages are changed to PublishedApi
2016-12-09 11:55:14 +01:00
Ilya Gorbunov
3e69820907
Fix ClosedComparableRange.contains implementation, add docs.
2016-12-08 22:13:02 +03:00
Ilya Gorbunov
8ec2a2e6fe
Add NaN-propagation in coerceIn(ClosedComparableRange<Double>)
2016-12-08 22:13:00 +03:00
Ilya Gorbunov
ea77673dde
Reimplement coerceIn to range with new range functions: lessThanOrEquals.
2016-12-08 20:50:26 +03:00
Ilya Gorbunov
d60fc7d9a8
Introduce ClosedComparableRange interface which inherits ClosedRange to provide special comparison operation for double and float.
2016-12-08 20:50:11 +03:00
Ilya Gorbunov
5773594412
Reimplement ClosedRange.contains extensions to call interface contains method.
2016-12-08 20:50:07 +03:00
Ilya Gorbunov
4721dcd07c
Add specialization overloads for Float.rangeTo and Double.rangeTo to resolve them statically.
2016-12-08 20:49:10 +03:00
Ilya Gorbunov
f5cc53c157
Provide ComparableRange specializations for Double and Float.
...
#KT-4481
2016-12-08 20:47:24 +03:00
Ilya Gorbunov
2fa98323f1
Refactor: rename files.
2016-12-06 21:30:35 +03:00
Ilya Gorbunov
d5f5f88cda
Add number to string conversion with the specified radix.
...
#KT-8286
2016-12-06 21:30:35 +03:00
Ilya Gorbunov
75d80acac9
Rework existing unit tests used as samples.
2016-12-02 22:41:25 +03:00
Ilya Gorbunov
dc57d69085
Improve onEach templates.
...
Add new functions to reference API.
Add tests for onEach
#KT-8220
2016-11-30 16:46:56 +03:00
Ilya Gorbunov
21fba92c93
Annotate new number parsing functions with SinceKotlin.
...
#KT-8286, #KT-7930
2016-11-30 02:33:51 +03:00
Ilya Gorbunov
9b421eb7a4
Throw IllegalArgumentException instead of NumberFormatException on incorrect radix.
2016-11-30 02:20:33 +03:00
Ilya Gorbunov
410e85ef79
Minor: extract a couple of platform-specific functions.
2016-11-30 02:19:38 +03:00
Ilya Gorbunov
4d6c5bcdcf
Split API to separate overloads with radix parameter and without.
...
Remove unused radix parameter from toFloat and toDouble.
Update public API dump.
#KT-8286, #KT-7930
2016-11-30 02:19:36 +03:00
voddan
0a939a647f
Added optional radix parameter to string-parsing functions: String.toInt, String.toIntOrNull etc.
...
#KT-8286
2016-11-30 02:19:29 +03:00
voddan
ce9c981e26
Implemented String.toIntOrNull , String.toLongOrNull.
...
Rewrote `String.toShortOrNull` and `String.toByteOrNull` by delegating to `String.toIntOrNull`.
Added a regEx check into `String.toDoubleOrNull` to prevent throwing exceptions mostly.
#KT-7930
2016-11-30 02:19:26 +03:00
voddan
3d050322e0
Added String.toIntOrNull, etc
...
#KT-7930
2016-11-30 02:17:35 +03:00
voddan
fb51d21888
Extracted string-parsing extensions and their tests into separate files.
2016-11-30 02:17:35 +03:00
Ilya Gorbunov
0eba06405a
Use InputStream as another guess for estimated size in InputStream.readBytes()
2016-11-22 23:37:29 +03:00
Ilya Gorbunov
e41cbe6fe1
Check that the length of a file can be represented as Int.
2016-11-22 23:37:27 +03:00
Ilya Gorbunov
c90ee13656
Performance: use byte array buffer directly to read the entire contents of a file.
...
#KT-14883 Fixed
2016-11-22 23:37:05 +03:00
Ilya Gorbunov
50cd620f92
Remove java.util.* imports from common code.
2016-11-21 18:20:33 +03:00
Ilya Gorbunov
5c2fe13a89
Refer to java.util.Arrays fully-qualified in generated code
2016-11-16 18:47:42 +03:00
Ilya Gorbunov
fae5c88f22
Remove java.util references from the common code
2016-11-16 18:47:42 +03:00
Ilya Gorbunov
63535393e7
Move Comparator to kotlin.comparisons and make it imported by default.
...
#KT-2084
2016-11-16 18:47:42 +03:00
Ilya Gorbunov
090bd76ac9
Introduce type aliases for jvm collections in kotlin.collections
...
#KT-2084
2016-11-16 18:47:42 +03:00
Ilya Gorbunov
09072f6cdc
Remove toInt() conversion as it's hardly required.
...
#KT-14789
2016-11-15 16:38:52 +03:00
Ilya Gorbunov
8de67d039b
Expose maximum version component value as a constant, increase it to 255.
...
Add tests for KotlinVersion, document remaining parts of API.
#KT-14789
2016-11-15 16:38:52 +03:00
Ilya Gorbunov
5f7d779370
Introduce KotlinVersion API
...
#KT-14789
2016-11-15 16:38:52 +03:00
Ilya Gorbunov
8feaaf4df0
Allow to annotate generated API with SinceKotlin and annotate new array functions.
2016-11-08 18:08:59 +03:00
Ilya Gorbunov
dceec89572
JS: Array.toString is const, Array.contentToString is shallow, Array.contentDeepToString is deep and self-reference aware
...
#KT-13582
2016-11-08 17:23:45 +03:00
Ilya Gorbunov
a868eecb1a
Introduce contentEquals/HashCode/ToString for Arrays. Different methods for deep equals/hashCode/toString rather than overloads with a parameter, because most of the time it would be constant, and make these methods inline-only.
...
Make `contentEquals` infix function.
Add docs.
#KT-13582
2016-11-08 17:23:45 +03:00
Ilya Gorbunov
660dc94f7c
Move Closeable to its usage, move internal Serializable to kotlin package in JS, introduce internal typealias in kotlin.io in JVM.
2016-11-07 21:39:36 +03:00
Alexander Udalov
3db459c1d8
JS: drop Collections.reverse and java.util.Collections altogether
2016-11-07 12:27:54 +03:00
Alexander Udalov
316fbd820b
JS: drop Collections.sort
2016-11-07 12:27:13 +03:00
Alexander Udalov
30a7790dca
Minimize references to java.util.Collections in stdlib sources
...
Only three usages are left in platform-independent code: in reverse, sort and
sortWith for mutable lists
2016-11-07 12:20:14 +03:00
Alexander Udalov
b52f67132e
Fix some warnings in JS-specific stdlib sources
2016-11-07 12:20:14 +03:00
Ilya Gorbunov
49ea0f5984
Relax generic variance in Array.flatten
2016-10-31 22:05:38 +03:00
Ilya Gorbunov
baccac30fb
Annotate explicitly stdlib sources, which must be excluded from JS stdlib with @JvmVersion, do not use file naming convention.
2016-10-26 17:47:15 +03:00
Ilya Gorbunov
e6887ea4e5
Use abstract readonly collections as base classes for implementing collection properties of regex MatchResult
2016-10-14 19:06:25 +03:00
Ilya Gorbunov
703ee6bd78
Have mutable collection interfaces specified explicitly to get rid of platform types in parameter and return types.
2016-10-14 19:06:25 +03:00
Ilya Gorbunov
a57321dea8
Annotate all new API with SinceKotlin in kotlin-stdlib and kotlin-test
2016-10-13 08:37:30 +03:00
Ilya Gorbunov
a239231c75
Revert dropping inline-only extensions for Throwable, to be able to use runtime of 1.1 with language version of 1.0 which makes mapped builtin members unavailable again.
...
#KT-14213 Fixed
2016-10-11 16:46:14 +03:00
Denis Zharkov
1ad9f1c985
Fix serialVersionUID for EmptyMap and EmptySet
...
Otherwise removal of redundant special stubs
leads to InvalidClassException during deserialization
2016-10-07 11:59:15 +03:00