Commit Graph

812 Commits

Author SHA1 Message Date
Ilya Gorbunov 8ac613dd67 Fix docs for String.partition
#KT-8493 Fixed
2015-07-17 10:54:40 +03:00
Ilya Gorbunov fbd0c16551 Merging arrays without creating iterators. 2015-07-17 10:54:28 +03:00
Ilya Gorbunov 9d120dcd44 Provide minus and minusAssign for iterables, collections, sets, sequences.
removeAll and retainAll special case optimizations.
#KT-3721 Fixed
#KT-7466 Fixed
2015-07-17 10:53:18 +03:00
Ilya Gorbunov 048a3ebcc1 Implement plus for sequence as operand and refactor plus tests. 2015-07-17 10:53:05 +03:00
Ilya Gorbunov 0ee960da50 Change removeAll extension implementation to match the contract of member removeAll.
Add retainAll for sequences.
2015-07-17 10:52:51 +03:00
Ilya Gorbunov 2c28c5a8e8 Define plusAssign operator for mutable collections.
#KT-4020 Fixed
2015-07-17 10:52:25 +03:00
Ilya Gorbunov a7bf415ad5 plus: do not generate ambiguos overloads. 2015-07-17 10:51:35 +03:00
Ilya Gorbunov d89af24d6c Variance of arrays sorted out.
Use concat for array + 1 in JS.
2015-07-17 10:51:22 +03:00
Ilya Gorbunov 7866184eb6 Array.plus — different implementations for JVM and JS.
Array.copyOf, copyOfRange available in JS.
2015-07-17 10:51:09 +03:00
Ilya Gorbunov c883df544c Make plus operation to be strict binary or right external binary for Sets and Arrays. 2015-07-17 10:50:58 +03:00
Ilya Gorbunov 8b325e8a30 Make ByteArray.inputStream a method, not a property.
#KT-8360 Fixed
2015-07-15 17:48:56 +03:00
Ilya Gorbunov 4de5dd9aeb Drop deprecated FunctionalList, FunctionalQueue.
Remove dependency on FunctionalList from tests.
2015-07-15 17:45:56 +03:00
Ilya Gorbunov 0a320a13e5 Stdlib generators: change constants for Long: ZERO, ONE, -ONE. 2015-07-15 17:21:52 +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 e080753dc2 Provide toMap and putAll for Arrays and Sequences of key-value pairs.
#KT-4166 Fixed
2015-07-15 17:12:43 +03:00
Ilya Gorbunov 96b79eebe7 asSequence returns empty sequence singleton for empty arrays and strings.
#KT-8450 Fixed
2015-07-15 17:08:27 +03:00
Denis Zharkov 4479c215d4 Change return type for iterator method of asList impls for *Array
These objects implement AbstractList that extending MutableCollection.
After type propagation `iterator` of AbstractList become MutableIterator, so it cannot be overriden with immutable Iterator
2015-07-09 16:36:46 +03:00
Ilya Gorbunov 30ec88129c Clarify docs for capitalize and decapitalize methods. 2015-07-07 22:36:55 +03:00
Yan Zhulanow bffb24b075 Add publicField annotation 2015-07-07 16:35:22 +03:00
Ilya Gorbunov f7436064d0 Unify componentN templates and add NOTHING_TO_INLINE suppression. 2015-07-03 16:38:10 +03:00
Ilya Gorbunov 9618a3542f Provide getOrElse and getOrNull methods for indexed collections.
Breaking: elementAtOrElse is no longer inlined for Iterables and Sequences.
#KT-6952
2015-07-03 16:38:08 +03:00
Ilya Gorbunov 64379947fd Do not allow using getOrPut on concurrent maps.
#KT-5800 In Progress
2015-07-01 22:33:58 +03:00
Ilya Gorbunov a47325cc30 Provide getOrSet method for ThreadLocal<T: Any>
#KT-7927 Fixed
2015-07-01 22:30:17 +03:00
Ilya Gorbunov cb9d9cb77d Delegates.observable and vetoable inline their lambda parameters into ObservableProperty implementation.
ObservableProperty made abstract.
#KT-5388
2015-07-01 22:23:14 +03:00
Ilya Gorbunov 9dbc4e4eef Provide another type of callback to the ObservableProperty which is called after the property value has been changed.
#KT-6866 Fixed
2015-07-01 22:23:11 +03:00
Ilya Gorbunov 6b700c4ba6 Restore and undeprecate removed Iterator.forEach(). 2015-06-29 17:06:48 +03:00
Ilya Gorbunov 34f939a476 Make sequence implementations private. 2015-06-29 17:06:46 +03:00
Ilya Gorbunov 4660b07687 StdLib cleanup: drop deprecated iterators and streams. 2015-06-29 17:06:45 +03:00
Ilya Gorbunov 35166f44ae StdLib deprecations cleanup: string operations. 2015-06-29 17:06:41 +03:00
Ilya Gorbunov 5779b89ff0 Deprecations cleanup: sequence -> asSequence 2015-06-29 17:06:33 +03:00
Ilya Gorbunov f3a19ebe11 StdLib deprecations cleanup: length, size, indices and other collection operations. 2015-06-29 17:06:20 +03:00
Ilya Gorbunov 00a44f6d4f StdLib deprecations cleanup: *array -> *arrayOf, copyToArray -> toTypedArray. 2015-06-29 17:05:57 +03:00
Ilya Gorbunov cbdaf2a151 Minor: regenerate generated code. 2015-06-26 19:40:56 +03:00
Ilya Gorbunov d20d8e2106 2nd stage of replaceFirst semantics change: remove deprecated String.replaceFirst(String), rename replaceFirstLiteral to replaceFirst. 2015-06-24 21:48:09 +03:00
Ilya Gorbunov 249106647c 2nd stage of split semantics change: remove deprecated String.split(String), rename splitBy back to split. Provide replacement for splitBy and splitWithRegex (JS). 2015-06-24 21:48:07 +03:00
Ilya Gorbunov d04e94c826 Use NoSuchElementException instead of KeyMissingException. Deprecate KeyMissingException. 2015-06-24 21:39:40 +03:00
Ilya Gorbunov 9c7992abbb Use getOrElse in MapVal.get 2015-06-24 21:39:38 +03:00
Ilya Gorbunov a6b7857d57 Drop complicated MapAccessors. Deprecate simple cases of Delegates.mapVar and Delegates.mapVal in favor of direct delegation without wrappers. 2015-06-24 21:39:37 +03:00
Ilya Gorbunov d2feefbf3a Document map delegation accessors and withDefault functionality. 2015-06-24 21:39:36 +03:00
Ilya Gorbunov 2f8a431a79 Change getOrElse and getOrPut implementations so that double lookup is made when map doesn't contain value, rather when does. 2015-06-24 21:39:34 +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 d137a83471 Simple extensions to delegate readonly property to Map and read-write property to MutableMap without delegate wrappers.
Delegation to map with custom key selector by map accessors.
2015-06-24 21:39:31 +03:00
Ilya Gorbunov 2989586582 Change Lazy from an interface to an abstract class with internal constructor to prevent implementations violating its contract. 2015-06-24 21:39:30 +03:00
Ilya Gorbunov 346ea28337 lazyOf to create already initialized lazy value. 2015-06-19 23:08:17 +03:00
Ilya Gorbunov b71fe4cd25 Lazy: Rename valueCreated property to isInitialized() function.
Notes about behavior of Lazy when initializer throws an exception.
2015-06-19 23:08:15 +03:00
Ilya Gorbunov ecd131a7a1 Lazy made serializable. 2015-06-19 23:08:14 +03:00
Ilya Gorbunov bfdb200cc7 Lazy: Use UNINITIALIZED_VALUE instead of null to indicate that value was not initialized. Remove escape and unescape methods. 2015-06-19 23:08:12 +03:00
Ilya Gorbunov 59ff9dc3cf Document lazy interface and methods. 2015-06-19 23:08:11 +03:00
Ilya Gorbunov 536e669023 Provide Lazy<T> in kotlin package — an interface that represents lazily computed value. Read-only properties can be delegated to lazy with the extension getter. Delegates.lazy and blockingLazy are deprecated. 2015-06-19 23:08:09 +03:00
Ilya Gorbunov f2788d53c0 Refactor: rename PropertyMetadata parameter from 'desc' to 'property'.
Correct test data after parameter has been renamed.
2015-06-19 23:08:08 +03:00