Alexander Udalov
7f4b568021
Mark new KClass.cast/safeCast extensions as low-priority
...
To avoid overload resolution ambiguity error in sources where everything
from both kotlin.reflect and kotlin.reflect.full is imported with a
star-import
2019-11-05 19:34:06 +01:00
Alexander Udalov
896512f7cd
Support KClass.isInstance/cast/safeCast in stdlib-only reflection implementation
...
#KT-14720 Fixed
2019-10-29 15:52:00 +01:00
Abduqodiri Qurbonzoda
d66f07a84e
CollectionsKt.windowed throws IllegalArgumentException
2019-09-20 00:50:54 +03:00
Abduqodiri Qurbonzoda
f01420332f
Avoid division in string-to-number conversions (KT-26309)
2019-09-15 21:08:23 +03:00
Ilya Gorbunov
7ff01b02a9
Make ExperimentalTime annotation documented
2019-08-22 21:29:18 +03:00
Ilya Gorbunov
2c79b1f89e
Minor: fix incorrect reference in kdoc
2019-08-22 21:29:18 +03:00
Ilya Gorbunov
fba22606e6
Introduce erroneous operators ClockMark.minus/compareTo(ClockMark)
...
To provide a better diagnostic message on their misuse.
2019-08-16 15:29:17 +03:00
Ilya Gorbunov
ac07cb686b
Change status of ExperimentalTime API to a more risky one
2019-08-16 15:29:17 +03:00
Ilya Gorbunov
a985402507
Introduce ClockMark.hasPassedNow, hasNotPassedNow functions
...
Makes it more clear to use them than comparing elapsed with Duration.ZERO.
2019-08-16 15:29:16 +03:00
Ilya Gorbunov
44195d436e
Rename: Clock.markNow, ClockMark.elapsedNow
...
Add "Now" suffix to the names of functions that depend on the current
time moment.
2019-08-16 15:29:16 +03:00
Ilya Gorbunov
a493d46a6e
Make effectively private properties actually private to avoid accessors
2019-08-16 15:29:16 +03:00
Ilya Gorbunov
f889d25287
Introduce TestClock.plusAssign(Duration) and hide implementation details
...
TestClock.plusAssign(Duration) is for advancing TestClock time.
Hide reading value, do not allow to provide initial reading,
fix clock unit to nanoseconds at construction time.
2019-08-16 15:28:45 +03:00
Ilya Gorbunov
4de9361c37
Introduce Duration.isPositive method
2019-08-16 15:25:57 +03:00
Ilya Gorbunov
65b0a5f903
Unify withIndex docs wording
2019-08-01 19:55:36 +03:00
Jake Wharton
1a6069382e
Provide Array.fill in common stdlib
...
KT-32359
2019-08-01 19:02:38 +03:00
Ilya Gorbunov
695d657ca8
Random.nextLong: use progression properties consistently
...
Apply inspection suggestion that helps to reduce boxing.
2019-07-31 21:53:16 +03:00
Ilya Gorbunov
945e058586
Document return value of removeAll and retainAll with predicate
...
#KT-32532 Fixed
2019-07-17 14:27:26 +03:00
keijumt
3f5d64e635
Add sample of hashMapOf
2019-07-12 17:10:15 +03:00
Pavel Semyonov
2577dfa06a
docs: added KDoc for Comparator, fixed KDoc for comparison binarySearch()
2019-07-12 16:08:37 +03:00
Abduqodiri Qurbonzoda
96dcafdf35
Document order of array elements initialization (KT-32353)
2019-07-11 21:18:47 +03:00
Ilya Gorbunov
7d14fb756d
Make Duration storageUnit inline val to avoid state initialization
...
Avoid state initialization in JS and Native
2019-07-09 20:39:28 +03:00
Ilya Gorbunov
39bdf34b9f
Use common implementation of fastLog2 based on countLeadingZeroBits
2019-07-08 19:09:32 +03:00
Ilya Gorbunov
f8724654a1
Bit query and bit rotation functions for Int, Long, Short, Byte
...
#KT-12749
2019-07-08 19:09:32 +03:00
Svyatoslav Kuzmich
0b19a4a32b
[JS IR BE] Initial version of member namer
2019-06-21 17:02:01 +03:00
Ilya Gorbunov
d7252548fc
Add symmetric number * duration operators
2019-06-18 19:49:50 +03:00
Ilya Gorbunov
a5b7c270ae
Change Duration.toString(unit, decimals) formatting
...
- switch to scientific notation when value is too big (greater than 1e14)
- allow at most 12 decimals, larger values are coerced to 12
- use scientific format with exactly two decimals in mantissa in JVM
2019-06-18 19:49:35 +03:00
Ilya Gorbunov
58b04c7974
Add remaining docs for Duration members, runnable samples for toString
2019-06-18 04:02:35 +03:00
Ilya Gorbunov
ffd9d8c71d
Remove unneeded buildString from Duration.toString
2019-06-18 04:02:35 +03:00
Ilya Gorbunov
c66740a7ed
Explicit public visibility, SinceKotlin and ExperimentalTime status
...
Use file level ExperimentalTime opt-in in tests.
2019-06-18 04:02:35 +03:00
Ilya Gorbunov
3b989cc815
Avoid using 'D' component in ISO duration string representation
...
Days in ISO have nominal duration, they are not always equal to 24H
2019-06-18 04:02:34 +03:00
Ilya Gorbunov
6dbc2eeb90
Provide more efficient ClockMark implementation
...
Do not use default 'plus' operator implementation, that creates a wrapping
AdjustedClockMark instance, create instance of the same type instead.
2019-06-18 04:02:34 +03:00
Ilya Gorbunov
8c730e180c
Make ClockMark an abstract class instead of an interface
2019-06-18 04:02:34 +03:00
Ilya Gorbunov
368452748b
Move convertDurationUnit into Duration companion
2019-06-18 04:02:33 +03:00
Ilya Gorbunov
ca10d13f34
Rename Duration storage property to 'value'
2019-06-18 04:02:33 +03:00
Ilya Gorbunov
365cbb94cd
Change Duration.absoluteValue to property
2019-06-18 04:02:33 +03:00
Ilya Gorbunov
3f7a0d0845
Rename DurationMeasured to TimedValue, withMeasureTime to measuredTimeValue
...
Add measureTime docs
2019-06-18 04:02:33 +03:00
Ilya Gorbunov
9deac2a591
Rename withComponents to toComponents and add two overloads of them
2019-06-18 04:02:33 +03:00
Ilya Gorbunov
796ad29637
Add shortcuts to convert duration to milliseconds and nanoseconds
2019-06-18 04:02:32 +03:00
Ilya Gorbunov
8004c34e44
Reduce Duration API surface, add top-level docs
...
- toDuration(unit) extension instead of constructors
- toDouble/Long/Int(unit) function instead of inUnits()
- remove static factory functions
- remove MIN_VALUE/MAX_VALUE constants
2019-06-18 04:02:32 +03:00
Ilya Gorbunov
b5d16f1a9b
Simplify Clock/ClockMark design
...
- Do not require initialElapsed parameter
- Introduce instead ClockMark +- Duration operators
- Do not require ClockMark to expose its originating Clock back
- Turn elapsedFrom property into elapsed() function
- Rename abstract clock classes
- Fix unit of abstract clocks when constructing them
Add top-level docs for Clocks
2019-06-18 04:02:32 +03:00
Ilya Gorbunov
b816f50d4d
Implement and test default string formatting in JVM and JS
...
Relax Duration.toString tests for JS and Native rounding specifics
2019-06-18 04:01:55 +03:00
Ilya Gorbunov
c1f7fd0281
Duration: test toString in particular units
2019-06-18 03:59:52 +03:00
Ilya Gorbunov
b9c56af9ba
Change Duration value storage unit to ns
2019-06-18 03:59:52 +03:00
Ilya Gorbunov
7977b6cdb8
Implement DurationUnit in JS, add doc summary and conversion test
2019-06-18 03:59:51 +03:00
Ilya Gorbunov
37c5f2c54f
Initial prototype of Duration and Clocks API
2019-06-18 03:59:51 +03:00
Ilya Gorbunov
a1979677d0
Docs: mark all experimental annotations as MustBeDocumented
...
So that they are shown in the docs of annotated experimental API
2019-06-15 16:37:45 +03:00
Kevin Peek
4c91ba90bb
Add links to Scope Functions docs (PR #2407 )
...
Add links to Scope Functions docs on kotlinlang.org to 'with', 'run', 'let', 'apply', and 'also' extension function docs
2019-06-13 20:49:38 +03:00
Alexander Udalov
fec9ee6408
Minor, add kdoc for typeOf
2019-06-07 00:29:35 +02:00
Abduqodiri Qurbonzoda
81d2d3cb6a
Implement String to/from CharArray conversion (KT-29265)
2019-05-06 15:54:28 +03:00
Ilya Gorbunov
5f2762ed20
Follow up: fix typos in coroutine docs
2019-05-01 05:40:35 +03:00