Commit Graph

68 Commits

Author SHA1 Message Date
Ilya Gorbunov b5e637bed5 Rename toMap with selector and transform to toMapBy 2015-12-17 22:50:44 +03:00
Ilya Gorbunov 544bc9a70c Introduce toMap with key-value pair selector.
#KT-6657
2015-12-17 22:50:43 +03:00
Ilya Gorbunov 33b366b9b9 Relax upper bound of T for minBy and maxBy to be nullable.
Swap type parameters of minBy and maxBy.
#KT-10099 Fixed
2015-12-14 04:56:45 +03:00
Ilya Gorbunov 81e7826568 Move generated code between packages. 2015-12-14 03:49:43 +03:00
Ilya Gorbunov 0ffce06356 Hide toMap with keySelector
#KT-6657
2015-12-01 01:18:46 +03:00
Ilya Gorbunov 6ca647aecd Minor: cleanup asSequence() documentation. 2015-12-01 01:18:19 +03:00
Ilya Gorbunov f596d9ac23 Provide asIterable also for CharSequences, Maps and Iterables.
KT-10152 Fixed
2015-12-01 01:18:18 +03:00
Ilya Gorbunov 941167e241 Revert "Drop deprecated toGenerator and toLinkedList." until RC 2015-11-29 04:37:45 +03:00
Ilya Gorbunov f8fe3e6c1d Restore dropped hidden declarations for binary compatibility until RC. 2015-11-29 04:37:35 +03:00
Ilya Gorbunov 54b415593a Replacement upcasts parameter to the most specific supertype in case of contains, indexOf, lastIndexOf, remove, get, containsKey, containsValue. 2015-11-28 07:21:38 +03:00
Ilya Gorbunov a25f23a286 Apply @OnlyInputTypes on type parameter for contains, indexOf, lastIndexOf extensions for Iterables, Sequences and Arrays instead of @NoInfer on element parameter.
Provide covariant extensions annotated with @OnlyInputTypes:
 - Collection<T>: containsAll(Collection<T>),
 - MutableCollection<out T>: remove(T), removeAll, retainAll (Collection<T>),
 - List<T>: indexOf(T), lastIndexOf(T)
 - Map<out K, V>: get(K), containsKey(K), contains(K)
 - Map<K, V>: containsValue(V)
 - MutableMap<out K, V>: remove(K)
All *Raw extensions are deprecated.
2015-11-28 07:20:24 +03:00
Ilya Gorbunov 77f69abca4 Drop deprecated toGenerator and toLinkedList. 2015-11-25 18:35:02 +03:00
Ilya Gorbunov a05d0a3c49 Drop hidden declarations provided for binary compatibility in beta2 2015-11-25 18:35:00 +03:00
Ilya Gorbunov 0dbbb6c19c Rename operand parameter of plus and minus for collections 2015-11-21 00:54:37 +03:00
Ilya Gorbunov 2ed277a863 Add upperbound constraint Comparable<T> to toSortedSet() and sortedMapOf()
Provide an overload of toSortedSet() with Comparator<in T> parameter
#KT-10115 Fixed
2015-11-21 00:54:33 +03:00
Ilya Gorbunov 0f70def3db StdLib: Rename method parameters (generated code) 2015-11-21 00:54:20 +03:00
Ilya Gorbunov a426c7879f Apply infix modifier on functions from stdlib where appropriate. 2015-11-21 00:54:12 +03:00
Ilya Gorbunov 838109c302 StdLib cleanup, deprecated symbol usage: replace end with endInclusive 2015-11-21 00:54:06 +03:00
Ilya Gorbunov 07654eb82b StdLib cleanup, deprecated symbol usage: size() and length() 2015-11-21 00:54:05 +03:00
Ilya Gorbunov f7135dfe50 Do not override default AbstractList iterator() implementation for primitiveArray.asList wrappers.
#KT-9927 Fixed
2015-11-11 16:41:39 +03:00
Ilya Gorbunov 8bdd1e3246 Sorting optimizations: do not make excessive copies, introduce methods to sort the whole array.
#KT-9904 Fixed
2015-11-11 03:29:40 +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 008a8059cf Introduce filterIndexed
#KT-9502 Fixed
2015-11-11 02:42:52 +03:00
Ilya Gorbunov 1a0c2e2cf6 In-place sorting.
#KT-9034
2015-11-05 09:04:31 +03:00
Ilya Gorbunov 4fc54a12b8 In-place reversing.
#KT-9034
2015-11-05 09:02:58 +03:00
Ilya Gorbunov 8c5ac26613 Use CharSequence in repeat and joinToString. 2015-11-04 22:19:39 +03:00
Ilya Gorbunov b4b84a38d5 Use templating in the docs for generated code to name things properly. 2015-11-04 22:19:37 +03:00
Ilya Gorbunov 935e606b64 Generalize String extensions to take CharSequence as receiver and parameters where applicable: generated code.
Exclude Strings family from default families.
2015-11-04 22:19:26 +03:00
Ilya Gorbunov 05c2edf60c Drop deprecated merge functions. 2015-11-04 00:05:47 +03:00
Ilya Gorbunov 65a98d6968 Temporary drop mapNotNull and mapNotNullTo.
Disable mapNotNull tests

#KT-4410
2015-11-04 00:05:45 +03:00
Ilya Gorbunov 3a82225201 Deprecate toGenerator and toLinkedList extensions. 2015-11-03 22:41:06 +03:00
Ilya Gorbunov 551e0181dc Require explicit type parameter specification for filterIsInstance. 2015-10-27 21:47:50 +03:00
Ilya Gorbunov fc7c008672 Provide deprecated unconstrained contains, indexOf, lastIndexOf methods for migration. 2015-10-20 02:31:18 +03:00
Ilya Gorbunov 95aac7ade6 Generate contains, indexOf, lastIndexOf with @NoInfer 2015-10-20 02:30:54 +03:00
Ilya Gorbunov d1d0807229 Add a note about *Raw functions behavior. 2015-10-16 23:55:37 +03:00
Ilya Gorbunov 683bc4bd01 Generate *Raw methods. 2015-10-16 23:38:29 +03:00
Ilya Gorbunov e24af934dc Use the same implementation in Array.toArrayList as in arrayListOf. 2015-10-16 19:20:26 +03:00
Dmitry Petrov 57869d85e8 Spread should always copy arrays.
Introduce a special (package private) utility class ArraysUtilJVM
to fix Array<T>.asList() issues.
2015-10-15 09:16:21 +03:00
Mikhail Glukhikh 78cfeb0d7d Stdlib rename: List.indexOf(T), List.lastIndexOf(T), MutableCollection.removeAll(Collection<T>), MutableCollection.retainAll(Collection<T>) 2015-10-14 20:40:09 +03:00
Denis Zharkov 6322198a11 Revert 'isEmpty' transformation 2015-10-14 20:40:01 +03:00
Denis Zharkov 61459961fc Adjust stdlib to isEmpty transformation 2015-10-10 12:29:14 +03:00
Denis Zharkov 888f8cc548 Adjust stdlib to contains* transformation 2015-10-09 14:40:34 +03:00
Ilya Gorbunov e09c0ae2ff Rename toMap { selector } to toMapBy.
#KT-6657
2015-10-08 17:48:47 +03:00
Ilya Gorbunov db93532e7c Deprecate merge and introduce instead zip with transform.
Add zip with transform for Strings.
2015-10-08 17:48:35 +03:00
Ilya Gorbunov 0b88801c66 Drop deprecated sorting and reversing methods. 2015-10-07 22:36:36 +03:00
Ilya Gorbunov e54db8cd2a Drop deprecated sequence() and withIndices() 2015-10-07 22:36:34 +03:00
Denis Zharkov 61416b3d14 Adjust stdlib to size transformation 2015-10-07 08:46:27 +03:00
Ilya Gorbunov 0851728454 Deprecate mapNotNull to change its behavior later.
#KT-4410
2015-10-06 18:32:06 +03:00
Ilya Gorbunov 60c2f0fe0b Redistribute generated code between files. 2015-09-25 21:10:08 +03:00
Ilya Gorbunov ae60f7a32f Prettify kdocs and exception messages in the generated code. 2015-05-27 22:16:15 +03:00