Commit Graph

55 Commits

Author SHA1 Message Date
Ilya Gorbunov bdd53ee9cd Introduce new overloads of flatMap and flatMapTo
- Sequence<T>.flatMap((T) -> Iterable<R>)
- Iterable<T>.flatMap((T) -> Sequence<R>)
- Array<T>.flatMap((T) -> Sequence<R>)
- Map.flatMap((Entry) -> Sequence<R>)

KT-34506
2020-06-02 19:01:43 +03:00
Abduqodiri Qurbonzoda 4a7b1b210a Add onEachIndexed similar to forEachIndexed #KT-37161 2020-04-11 03:47:47 +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
Ilya Gorbunov e21c235bbb Add or update copyrights in the standard library sources 2018-04-26 21:57:50 +03:00
Ilya Gorbunov 20b122c1dd Use kotlin.test.Test instead of org.junit.Test in common stdlib tests
(and in jvm-only and js-only tests also)
2017-10-15 17:40:53 +03:00
Ilya Gorbunov f10ea03173 Provide extension to get mutable iterator from the mutable map
#KT-18992 Fixed
2017-07-24 21:02:15 +03:00
Ilya Gorbunov 6ae19e03d5 Clean warnings and refactor stdlib tests.
Merge RangeJVMTest into RangeTest.
2017-04-18 18:51:20 +03:00
Ilya Gorbunov 2e0209395a Restore Map.minus(key/keys) and Map.minusAssign(key/keys) operators.
#KT-13353
2017-01-25 22:08:46 +03:00
Ilya Gorbunov 822e58ad83 Map.getOrImplicitDefault is exposed public as Map.getValue
#KT-11851
2016-12-29 07:49:27 +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 6a70761783 Minor: normalize '@Test' annotation casing in all tests. 2016-11-21 18:20:33 +03:00
Ilya Gorbunov 50cd620f92 Remove java.util.* imports from common code. 2016-11-21 18:20:33 +03:00
Ilya Gorbunov 2c1d90c79d Improve test coverage of map operations 2016-08-10 21:52:24 +03:00
Ilya Gorbunov fb99919c59 Accept maps out-projected by key where possible. 2016-08-10 21:52:24 +03:00
Ilya Gorbunov e35a214eaf Review fixes: special case of toMap for singleton map.
#KT-9108
2016-08-09 21:49:57 +03:00
Ilya Gorbunov efc8f2c88a Provide extensions to copy maps.
#KT-9108
2016-08-09 21:49:57 +03:00
Ilya Gorbunov 4b533b297e reified assertFailsWith available in kotlin-test for JS
#KT-11346
2016-04-27 18:22:20 +03:00
Ilya Gorbunov d5d19f5595 Make Map.plus accept Map out-projected by key type as either operand (receiver or parameter).
#KT-11301 Fixed
2016-03-31 17:20:58 +03:00
Ilya Gorbunov d46501e11b Make all remaining deprecations to be errors. 2016-01-27 18:34:32 +03:00
Ilya Gorbunov 23080f78f7 Map.getOrPut: treat nulls as missing values. 2016-01-26 11:49:18 +03:00
Ilya Gorbunov a49db730a9 Map.getOrElse: treat nulls as missing values. 2016-01-26 11:49:17 +03:00
Ilya Gorbunov 8224a4e186 Rename toMap and toMapBy to associate and associateBy 2016-01-26 11:49:03 +03:00
Ilya Gorbunov 300a4be060 Deprecate Map.minus and minusAssign operators.
Disable tests failing in JS.
2016-01-22 01:13:33 +03:00
Ilya Gorbunov aafd79078f Provide mutableSetOf and mutableMapOf
#KT-9663 Fixed
2016-01-18 21:46:29 +03:00
Ilya Gorbunov 19a4f65fd1 Cleanup in libraries 2016-01-17 15:52:12 +03:00
Ilya Gorbunov 188119aa83 Prepare to treat keys mapped to null same way as missing keys in Map extensions: getOrElse, getOrPut, getOrImplicitDefault. 2015-12-18 15:24:03 +03:00
Ilya Gorbunov 544bc9a70c Introduce toMap with key-value pair selector.
#KT-6657
2015-12-17 22:50:43 +03:00
Ilya Gorbunov dadcdb5771 StdLib cleanup, deprecated symbol usage: List and Map members 2015-11-21 00:54:08 +03:00
Ilya Gorbunov 07654eb82b StdLib cleanup, deprecated symbol usage: size() and length() 2015-11-21 00:54:05 +03:00
Ilya Gorbunov 9323f61eaf Introduce T.addTo(MutableCollection<T>), mapNotNull and mapIndexedNotNull extensions.
#KT-4410 Fixed
2015-11-11 03:12:17 +03:00
Ilya Gorbunov e09c0ae2ff Rename toMap { selector } to toMapBy.
#KT-6657
2015-10-08 17:48:47 +03:00
Ilya Gorbunov 12d9beb3a4 Deprecate join (use joinToString instead)
#KT-6909
2015-10-08 17:48:33 +03:00
Ilya Gorbunov 404b228954 StdLib cleanup: replace fails with assertFails 2015-10-07 22:36:06 +03:00
Denis Zharkov 5cecaa6f87 Get rid of deprecated annotations and modifiers in stdlib (besides JS) 2015-09-18 10:14:28 +03:00
Ilya Gorbunov d1a12aa2a7 plus, plusAssign, minus, minusAssign for all possible parameter types for Maps.
#KT-6594 Fixed
2015-07-15 17:12:45 +03:00
Ilya Gorbunov d04e94c826 Use NoSuchElementException instead of KeyMissingException. Deprecate KeyMissingException. 2015-06-24 21:39:40 +03:00
Ilya Gorbunov 5306e88425 Provide the way to specify implicit default for a readonly or mutable map.
Refactor: rename default key and value providers.
2015-06-24 21:39:33 +03:00
Ilya Gorbunov 46d91b2606 Add test for toMap with key selector and value transform. 2015-05-20 19:28:45 +03:00
Ilya Gorbunov 899a01e8c2 Rename sequence() extension to asSequence() 2015-04-22 17:57:20 +03:00
Ilya Ryzhenkov e448f40756 Rename Stream<T> to Sequence<T> and provide migration path via deprecated types and functions. 2015-03-12 22:56:43 +03:00
Ilya Ryzhenkov bfeb21afb0 stdlib: stream() for Map #KT-6547 Fixed 2015-03-10 11:21:41 +03:00
Laszlo Hornyak 3954215b50 Add support for + and - operators in immutable maps #KT-6594 Fixed 2015-03-10 11:21:38 +03:00
Ilya Ryzhenkov 4ee64d7283 Covering stdlib with tests. 2015-01-20 22:37:16 +03:00
Ilya Ryzhenkov 9b04f57a25 Collection tests: format and fix usages of deprecated symbols. 2015-01-20 22:37:15 +03:00
Ilya Ryzhenkov be717f48f8 Stop using deprecated APIs 2014-12-16 17:33:24 +03:00
Ilya Ryzhenkov 3980664049 Tests for map functions. 2014-07-16 21:35:12 +04:00
Zalim Bashorov 9b081fd254 Minor: assert -> assertTrue 2014-07-16 21:35:10 +04:00
Ilya Ryzhenkov 4ea62071b5 Split tests into platform-independent and JVM. 2014-07-16 21:35:09 +04:00
Ilya Ryzhenkov a9da7cfeea Use LinkedHashMap everywhere to preserve order. 2014-07-16 21:35:09 +04:00
Ilya Ryzhenkov 3491c88793 Recover test for mutable List variable and move it to ListSpecificTests 2014-07-16 21:35:07 +04:00