Commit Graph

123 Commits

Author SHA1 Message Date
Valeriy.Vyrva c023a02884 Create SortedMap with Comparator and items
KT-34142
2020-06-04 02:04:22 +03:00
Dmitry Borodin dd46d5ca5a Add sample for Map.flatMap 2020-05-19 19:24:00 +03:00
Dmitry Borodin 1a0b59da49 KT-20357 Add sortedBy() sample (#3283) 2020-05-19 19:21:21 +03:00
Segun Famisa d6a8003743 Add samples for String/CharSequence filter & filterNot (#3390)
* Add samples for String/CharSequence filter & filterNot
* Link samples to stdlib generator
2020-05-18 23:15:41 +03:00
Ilya Gorbunov 5d724a8cbc Fix samples package import
Dokka can only clean samples.* import when converting samples to
runnable.
2020-05-12 17:35:33 +03:00
Ilya Gorbunov 893021f22b Introduce runningFold and runningReduce operations
runningFold is a synonym for scan,
runningReduce replaces scanReduce.

#KT-38060
2020-04-15 23:28:07 +03:00
Miguel Serra 61ad32f012 Samples of Map functions "contains" and "isNotEmpty"
Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com>
2020-03-31 04:54:51 +03:00
Ilya Gorbunov 606b4db48a Improve samples for partition: add destructuring 2020-03-31 02:04:56 +03:00
n-p-s 7bb7c86fa9 Add samples for partition 2020-03-31 02:04:55 +03:00
Ilya Gorbunov dd2aa3de28 Add sample for filterNot and improve sample for filter 2020-03-31 02:04:55 +03:00
Brian Plummer f887a29279 Add sample for filter 2020-03-31 02:04:55 +03:00
adammc331 840f222867 Add sample for filterNotNull 2020-03-31 02:04:55 +03:00
Scott Weber e8ee405cdb Add sample for text version of chunked 2020-03-31 02:04:55 +03:00
Abduqodiri Qurbonzoda b1fac4e721 Implement reduceIndexedOrNull and reduceRightIndexedOrNull #KT-36866 2020-03-12 18:08:55 +03:00
Alexander Udalov 787e4503e5 Migrate -Xuse-experimental -> -Xopt-in in project sources 2020-03-10 12:07:15 +01:00
Abduqodiri Qurbonzoda ce8e511b79 Add setOfNotNull function #KT-35851 2020-02-18 02:33:59 +03:00
Mikhail Zarechenskiy 155b716e7e Revert "Disable NewInference for stdlib tests"
This reverts commit cdf5323f8c.
2020-02-17 10:29:46 +03:00
Mikhail Zarechenskiy cdf5323f8c Disable NewInference for stdlib tests
There is one failing test namely `ValByMapExtensionsTest.doTest`, which
 is quite questionable because its checks the use of out projection and
 Exact annotation (see KT-18789)
2020-02-13 11:15:56 +03:00
Abduqodiri Qurbonzoda ed7b8e9b85 Scan functions for Sequences and Iterable #KT-7657 2020-02-13 04:01:47 +03:00
Ilya Gorbunov 4aa7d45a5a KT-15363 Collection builders: improve tests and samples 2020-01-24 15:28:17 +03:00
Fleshgrinder bf9d3d87a6 KT-15363 Collection Builders
Added container builders for lists, sets, and maps.
The new experimental type inference only works for the simple builders
with a single generic type. The versions with nullability and the maps
still require explicit specification of the types. Obviously explicit
specification is required for all users who are not using the new
experimental inference. Improving the type inference is something that
should be done separately and many things – including these builders –
will benefit from it, however, this is not a blocker for these builders
in my opinion.
2020-01-24 15:28:17 +03:00
Miguel Serra 4fa5e2d85c KT-20357: Add samples for linkedSetOf 2019-12-26 20:07:39 +03:00
Tillmann Berg 95300ae31d KT-20357: Add sample for reduce, reduceRight and their indexed counterparts 2019-12-26 19:57:33 +03:00
Alfredo Delli Bovi 9546307243 Add sample for reduceOrNull and reduceRightOrNull 2019-12-26 19:27:46 +03:00
Tillmann Berg cf86dc9a89 KT-20357: Add sample for Collections distinct and distinctBy methods 2019-12-11 07:42:05 +03:00
Ilya Gorbunov 555d503ff9 Improve indexOf sample to showcase return value handling
Remove sample reference from indexOf(Char) overload: both overloads are on
the same page, and showing the sample for indexOf(String) under indexOf(Char)
is redundant and misleading.
2019-11-29 21:34:49 +03:00
Burak Eregar e30d87ee01 KT-20357: Add samples for indexOf 2019-11-29 21:34:49 +03:00
Dmitry Borodin 664d69b752 Add flatMap sample KT-20357 2019-11-29 17:35:06 +03:00
Dat Trieu f334ad2ffc KT-20357: Add samples for associate* functions (#2798)
* KT-20357: Add samples for functions related to associate

* KT-20357: Use same fib function for both samples

* KT-20357: Use examples with duplicate keys and simplify examples with primitives

* KT-20357: Use primitive samples for all arrays

* KT-20357: Use String splitting example to better illustrate the use for associate over associateBy with a valueSelector
2019-11-29 16:54:02 +03:00
Yanis Batura e9e3df23fc Fix typos and improve grammar in stdlib readmes (#2527)
* Fix typos in the main ReadMe.md

* Fix typos in the stdlib samples ReadMe.md

Co-Authored-By: ilya-g <ilya.gorbunov@jetbrains.com>
2019-08-16 19:56:56 +03:00
Ilya Gorbunov 4fc942c5e9 KT-16602: Improve mutable sorting samples, fix sample references 2019-07-12 21:34:54 +03:00
Dat Trieu 38d26b1d92 KT-16602: Provide samples for sorting API usage 2019-07-12 21:32:03 +03:00
keijumt 3f5d64e635 Add sample of hashMapOf 2019-07-12 17:10:15 +03:00
Ilya Gorbunov 58b04c7974 Add remaining docs for Duration members, runnable samples for toString 2019-06-18 04:02:35 +03:00
Benjamin Orsini 3e39f26379 Add map() documentation sample
* docs: add map() sample
* docs: add samples for Map and CharSequence
* docs: add another sample for Maps.map()
2019-05-20 19:20:09 +03:00
nikita.movshin 65244b4bea Update copyright.
Change the copyright from "JetBrains s.r.o." to
"JetBrains s.r.o. and Kotlin Project contributors"
Update only 2 lines copyright.
2019-04-23 20:09:22 +03:00
Abduqodiri Qurbonzoda 35c6f09886 Implement coerce extension functions for unsigned types 2019-03-15 17:46:48 +03:00
Ilya Gorbunov 6bc7c06038 Add samples for is(|Not|NullOr)Empty and is(|Not|NullOr)Blank functions 2019-03-13 17:58:05 +03:00
Ilya Gorbunov 42120b93b8 KT-29151 Provide specialized string samples for all drop/take functions
These include:
- take, takeLast, takeWhile, takeLastWhile,
- drop, dropLast, dropWhile, dropLastWhile
2019-03-11 19:30:59 +03:00
Burak Eregar 991e739693 KT-29151 Fix the problematic pages - CharSequence.take() & String.take() 2019-03-11 19:30:58 +03:00
Yaroslav Russkih 9ac52fad17 Use https everywhere - documentation and samples 2019-02-19 21:35:36 +01:00
Ilya Gorbunov ce577ac06b Minor: remove redundant imports in sample 2019-02-18 21:09:18 +03:00
Kevin Peek 565727e302 KT-20357 - Add sample for Regex.findAll() 2019-02-18 21:05:46 +03:00
Dave Leeds 6ff3ae3447 KT-20357: Add samples for commonPrefixWith and commonSuffixWith 2018-12-05 19:21:57 +03:00
Ilya Gorbunov b026b9eb22 Remove +ReleaseCoroutines explicit feature enabling
It's enabled by default in Kotlin 1.3
2018-11-09 04:00:26 +03:00
Ilya Gorbunov a64a76d5fc Remove experimental coroutines opt-in from build scripts
It has no effect in Kotlin 1.3

Only enable coroutines if '-ReleaseCoroutines' is used
2018-11-09 04:00:26 +03:00
Karen Schwane d88fd8aa6f KT-20357 Add samples for maxBy and minBy 2018-11-04 22:34:16 +03:00
Ilya Gorbunov 12a31637d1 Improve groupingBy samples 2018-09-28 19:59:30 +03:00
Ilya Gorbunov 3a40e3f041 Move groupingByEachCount together with the new Grouping samples 2018-09-28 19:51:07 +03:00
Itsuki Aoyagi 039d41679e Add samples for groupingBy operations 2018-09-28 19:51:07 +03:00