File: CHANGES.md

package info (click to toggle)
streamex 0.6.7-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,712 kB
  • sloc: java: 18,198; xml: 267; makefile: 2
file content (314 lines) | stat: -rw-r--r-- 18,313 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
# StreamEx changes

Check also [MIGRATION.md](MIGRATION.md) for possible compatibility problems.

### 0.6.7
* [#76] Added: `StreamEx.zipWith` accepting `BaseStream` (so zipWith(IntStreamEx.ints()) works)
* [#131] Added: `StreamEx.ofCombinations`
* [#164] Added: `Joining.maxElements`
* [#179] Added: `MoreCollectors.onlyOne(Predicate)`

### 0.6.6
* [#145] Added: `intersperse` method for all stream types.
* [#144] Added: `EntryStream.generate`
* [#162] Added: `StreamEx.ifEmpty`, `EntryStream.ifEmpty`

### 0.6.5
* [#137] Added: `StreamEx.toNavigableMap()`, `EntryStream.toNavigableMap()`
* [#141] Added: `StreamEx.flatArray()`, `EntryStream.flatArray()`
* [#143] Optimized: `AbstractStreamEx.takeWhile/takeWhileInclusive/dropWhile` for parallel unordered case.

### 0.6.4
* [#132] Fixed: `StreamEx.parallel(fjp)` does not parallelize underlying Java Stream if it already exists
* [#127] Added: `StreamEx.filterBy`
* [#128] Added: `EntryStream.prefixKeys`, `EntryStream.prefixValues`
* [#135] Added: `StreamEx.removeBy`

### 0.6.3

* [#111] Added: `StreamEx.toArray(elementClass)`
* [#112] Added: `StreamEx.toArray(emptyArray)`
* [#116] Added: `MoreCollectors.ifAllMatch()`
* [#119] Added: `AbstractStreamEx.toImmutableList()`, `AbstractStreamEx.toImmutableSet()`, `EntryStream.toImmutableMap()`
* [#123] Added: `StreamEx.into(collection)`, `EntryStream.into(map)`

### 0.6.2

* [#17] Optimized: `StreamEx.ofTree`, `EntryStream.ofTree`.
* [#104] Added: `StreamEx.ofReversed()`.
* [#105] Added: `MoreCollectors.minMax()`.
* [#108] Added: `IntStreamEx.of(IntBuffer)`, `LongStreamEx.of(LongBuffer)`, `DoubleStreamEx.of(DoubleBuffer)`.

### 0.6.1

* [#90] Changed: `AbstractStreamEx` class (which shares common functionality of `StreamEx` and `EntryStream`) is public now.
* [#92] Added: `IntStreamEx.of(InputStream)`.
* [#93] Added: `IntStreamEx.asByteInputStream()`.
* [#94] Added: `prefix` method for all stream types.

### 0.6.0
Warning: this release introduces some changes which may break backwards compatibility.

* [#67] Changed: `StreamEx.withFirst()` now includes `(first, first)` pair into result as well. If you want to exclude it, use `.withFirst().skip(1)`. 
* [#70] Fixed: `MoreCollectors.least()/greatest()` now support null element (if the supplied `Comparator` supports nulls).
* [#70] Fixed: `MoreCollectors.least()/greatest()` now returns stable result (the order of equal elements is not changed).
* [#70] Optimized: `MoreCollectors.least()/greatest()` is usually faster now, especially when the selected elements are close to the stream end.
* [#74] Added: `EntryStream.removeKeyValue()`.
* [#77] Added: `MoreCollectors.filtering()/mapping()/flatMapping()` with default downstream Collector `toList()`.
* [#79] Added: `iterate(seed, predicate, op)` for all stream types.
* [#82] Added: `Emitter` class and primitive friends to create non-trivial stream sources.
* [#83] Changed: `StreamEx.of(Collection)`, `of(Iterator)`, etc. now use `? extends T` type instead of just `T`.
* [#85] Added: `StreamEx.mapFirstOrElse()/mapLastOrElse()`.
* [#86] Added: `peekFirst()`, `peekLast()` for all stream types.
* [#89] Added: `produce()` method for all stream types.
* Updated documentation.

### 0.5.5
* [#41] Added: `IntStreamEx/LongStreamEx/StreamEx.without()` accepting several elements.
* [#60] Added: `StreamEx.zipWith()` to zip the stream with another.
* [#63] Optimized `IntStreamEx/LongStreamEx/DoubleStreamEx.reverseSorted()`: much faster now and take less memory.
* [#64] Added: `EntryStream.toMapAndThen()`.
* [#66] Added: `takeWhileInclusive()` for all stream types.
* [#71] Fixed: some collectors like `head(0)`, `greatest(0)` failed when using with JDK Stream.
* [#72] Added: `IntStreamEx.ints()` and `LongStreamEx.longs()`.
* [#73] Added: `EntryStream.collapseKeys()`.

### 0.5.4
* [#10] Added: `chain()` method to all stream types allowing fluently chaining custom operations.
* [#55] TailConcatSpliterator implemented; now all `StreamEx/EntryStream.append/prepend` methods are TSO-compatible. 
* [#56] Fixed: `StreamEx.append/prepend(Collection)` and `EntryStream.append/prepend(Map)` now properly append/prepend if supplied collection is concurrent (so it may be legally modified during the subsequent operations).
* [#57] JDK Stream creation is deferred until necessary. Now quasi-intermediate operations and especially `headTail()` may work faster.
* [#59] Added: `StreamEx.prepend(value)`, `StreamEx.append(value)` which might work faster than existing var-args methods.
* Updated documentation.

### 0.5.3
* [#50] Added: `StreamEx.withFirst()`: extract first stream element 
* [#51] Fixed: `StreamEx.parallel(fjp).runLengths()` fails to run the task in the specified pool.
* [#52] `StreamEx.append(T...)` and `prepend(T...)` are declared as @SafeVarargs and final now.
* [#53] Optimized: `mapFirst`/`mapLast` methods will have less overhead now, especially for primitive streams.
* [#54] Added: `StreamEx.headTail()`: map to the new stream using the first stream element and the stream of the rest elements. 

### 0.5.2
* [#3] Optimized: parallel performance of `StreamEx.ofLines` as well as `StreamEx.split`
* [#19] Optimized: pairMap and forPairs may work faster now, especially in the presence of upstream intermediate operations.
* [#42] Added: `EntryStream.ofTree` methods to stream the tree-like structure tracking nodes depth.
* [#46] Optimized: parallel performance of all `of(Iterator)` methods.
* [#47] Added: `EntryStream.flatMapToKey/flatMapToValue` methods.
* [#48] `EntryStream.of(key, value, key, value...)` now accepts up to 10 pairs.
* Fixed: `StreamEx.of(emptyList().iterator()).parallel()` failed with `NoSuchElementException`.

### 0.5.1

* [#13] Added: `StreamEx.split` to split with single character delimiter.
* [#28] Updated: now `StreamEx.select`, `EntryStream.selectKeys` and `EntryStream.selectValues` accept any type (not necessarily the subtype of current element).
* [#32] Added: `MoreCollectors.dominators` collector which collects the elements to the list leaving only "dominators".   
* [#33] Updated: `StreamEx.split("", pattern)` now returns stream of single `""` string instead of empty stream.
* [#35] Added: construction of all stream types from the `Iterator`.   
* [#36] Added: `StreamEx.of(Enumeration)` static method.
* [#38] Added: `scanLeft` for primitive streams.
* Updated documentation. 

### 0.5.0

Warning: this release introduces some changes which break the backward compatibility and will require the changes in source code if you used the previous StreamEx versions.

* The package `javax.util.streamex` is renamed to `one.util.streamex`. Every occurrence of `javax.util.streamex` in source files must be replaced with `one.util.streamex`.
* The OSGi Bundle-SymbolicName is changed from `javax.util.streamex` to `one.util.streamex`.
* The Maven groupID is changed from `io.github.amaembo` to `one.util`. Dependencies in pom.xml files should be updated accordingly.
* Added: `StreamEx.ofLines(Path)` and `StreamEx.ofLines(Path, Charset)`
* Added: `MoreCollectors.commonPrefix()/commonSuffix()` short-circuiting collectors.
* Added: `IntStreamEx.of(Integer[])`, `LongStreamEx.of(Long[])`, `DoubleStreamEx.of(Double[])` static methods.   
* Deprecated methods `StreamEx.ofEntries()` removed.
* Deprecated methods `collectingAndThen` in primitive collectors removed (use `andThen()` instead).
* Updated documentation. 

### 0.4.1

* Added: `StreamEx/IntStreamEx/LongStreamEx/DoubleStreamEx.mapLast/mapFirst` methods.
* Added: `MoreCollectors.flatMapping` collector.
* Added: `Joining` collector: an advanced version of `Collectors.joining` which may short-circuit.
* Fixed: `StreamEx.cross(mapper)` now correctly handles the case when mapper returns null instead of empty stream.
* Optimized: ordered stateful short-circuit collectors now may process less elements in parallel.
* Optimized: `StreamEx/EntryStream.toList()/toListAndThen()/foldRight()/scanRight()` now faster, especially for sized stream.
* Optimized: collapse-based operations like `StreamEx.collapse/groupRuns/runLengths/intervalMap` now may work faster,
especially when stream has more intermediate operations before them.
* Updated documentation. 

### 0.4.0

* Introduced the concept of short-circuiting collectors.
* `StreamEx/EntryStream.collect(Collector)` method works as short-circuit operation if short-circuiting collector is passed.
* `MoreCollectors.first/head` collectors are short-circuiting now.
* `MoreCollectors.groupingByEnum` collector may short-circuit if downstream collector is short-circuiting.
* `MoreCollectors.pairing` collector may short-circuit if both downstream collectors are short-circuiting.
* Added new short-circuiting collectors: `onlyOne`, `intersecting`, `toEnumSet`, `andingInt`, `andingLong`.
* Added new collectors: `filtering`, `groupingBy` (with domain specification) which short-circuit when downstream collector is short-circuiting.
* Added collectors `mapping`, `collectingAndThen`, `partitioningBy` which mimic standard JDK collectors, but short-circuit when downstream collector is short-circuiting.
* Added `indexOf` methods for all stream types. 
* Added `StreamEx/EntryStream.foldLeft/foldRight` methods without identity argument.
* Added `StreamEx/EntryStream.scanLeft/scanRight` methods without identity argument.
* Added `StreamEx.cartesianProduct/cartesianPower` methods with reduction operator.
* Added `IntStreamEx/LongStreamEx.range/rangeClosed` methods with additional step parameter.
* Added `IntStreamEx/LongStreamEx/DoubleStreamEx.foldLeft` methods.
* Methods `StreamEx/EntryStream.toMap/toSortedMap/toCustomMap` without merge function now produce better exception message in the case of duplicate keys.
* Methods `StreamEx/EntryStream.toMap/toSortedMap/toCustomMap` accepting merge function are not guaranteed to return ConcurrentMap for parallel streams now. They however guarantee now the correct merging order for non-commutative merger functions.
* Methods `StreamEx/EntryStream.grouping*` are not guaranteed to return the ConcurrentMap for parallel streams now. They however guarantee now the correct order of downstream collection.
* Methods `StreamEx.ofEntries` are declared as deprecated and may be removed in future releases!
* Deprecated methods `EntryStream.mapEntryKeys`/`mapEntryValues` are removed!
* Updated documentation

### 0.3.8

* Added `toBooleanArray` collectors (object and primitive).
* Added `MoreCollectors.distinctBy` collector.
* Added `StreamEx/EntryStream.distinct(keyExtractor)` intermediate operation.
* Added `EntryStream.distinctKeys/distinctValues` intermediate operations.
* Added `StreamEx.cartesianPower/cartesianProduct` static methods.
* Optimized: `MoreCollectors.least/greatest` collectors are now much faster (up to 10x depending on input).
* Updated documentation

### 0.3.7

* Added `MoreCollectors.groupingByEnum` collector.
* Added `IntCollector/LongCollector/DoubleCollector.averaging` primitive collectors.
* Added `IntCollector/LongCollector/DoubleCollector.andThen` default methods to replace `collectingAndThen`.
* Added `StreamEx.toFlatCollection` and `StreamEx.toFlatList` terminal operations.
* Added `StreamEx.ofSubLists(list, length, shift)` static method.
* Methods `IntCollector/LongCollector/DoubleCollector.collectingAndThen` are declared as deprecated and may be removed in future releases!
* Updated documentation

### 0.3.6

* Added `StreamEx.collapse(Predicate, Collector)` operation.
* Added `takeWhile` and `dropWhile` methods for all stream types.
* Added `StreamEx.ofPairs` and `EntryStream.ofPairs` methods.
* Optimized: `minBy*/maxBy*` methods for primitive streams now call keyExtractor function at most once per element.
* Updated documentation

### 0.3.5

* Generic arguments relaxed for `StreamEx` methods: `forPairs`, `collapse`, `groupRuns`, `intervalMap`, `sortedBy`.
* Added `MoreCollectors.minIndex/maxIndex` collectors.

### 0.3.4

* Fixed: `EntryStream.of(List<T>)`, `EntryStream.of(T[])` and `StreamEx.runLengths` returned stream
of `Map.Entry` objects which violate the documented contract for `equals` and `hashCode`.
* Fixed: `pairMap` method for all streams worked incorrectly when previous steps included `parallel().flatMap()` due to JDK bug. New version may also work faster in parallel for certain sources.
* Fixed: `collapse`-based methods (`collapse`, `groupRuns`, `runLengths`, `intervalMap`) worked incorrectly in various cases in parallel mode. New version may also work faster in parallel for certain sources.
* Fixed: `minBy*/maxBy*` for primitive streams now return strictly the first matched element (not the arbitrary one). 
* Optimized: `minBy/maxBy` methods for primitive streams now call keyExtractor function at most once per element
* Optimized: many stream creation methods (`zip` for all streams, `EntryStream.of(List)`, `StreamEx.ofSubLists`, etc.) now use custom spliterator.
* Optimized: `IntStreamEx.ofChars` reimplemented for JDK 8 as original `CharSequence.chars` implementation is poor.
* Added construction of all stream types from the `Spliterator`.
* Updated documentation

### 0.3.3

* Added `StreamEx.intervalMap` method
* Added `StreamEx.runLengths` method
* Added `StreamEx.ofSubLists` method
* Added `MoreCollectors.countingInt` collector
* `StreamEx/EntryStream.maxBy*/minBy*` methods optimized: now keyExtractor function is called at most once per element
* `StreamEx.groupRuns` method optimized (up to 5x performance boost depending on data)
* `StreamEx.collapse` methods changed: now the elements passed to the predicate are guaranteed to be two adjacent elements from the source stream.
* Updated documentation: now documentation is automatically copied from JDK for the inherited methods.

### 0.3.2

* Added `MoreCollectors` class: several useful collectors absent in JDK
* Added `skipOrdered(n)` method to every Stream implementation
* Updated documentation

### 0.3.1

* Added `mapToEntry` method for primitive streams
* Added `joining` methods family for primitive streams
* Added `StreamEx.collapse`/`groupRuns` methods
* Added `StreamEx.distinct(atLeast)` method
* Released jar works now as an OSGi bundle
* Updated documentation

### 0.3.0

* Added primitive collectors: `IntCollector`, `LongCollector`, `DoubleCollector`
* Added `flatMapToInt`/`flatMapToLong`/`flatMapToDouble`/`flatMapToObj` to primitive streams
* Added `EntryStream.flatMapKeyValue`/`filterKeyValue`/`mapToKey`/`mapToValue` methods
* Added `IntStreamEx.toCharArray`/`toShortArray`/`toByteArray` methods
* Added `DoubleStreamEx.toFloatArray` method
* Generic arguments for many methods are relaxed allowing more flexible usage
* Methods `EntryStream.mapEntryKeys`/`mapEntryValues` are declared as deprecated and may be removed in future releases!
* Updated documentation

### 0.2.3

* Added `toListAndThen()`, `toSetAndThen()` methods to `StreamEx` and `EntryStream`
* Added `StreamEx.cross()` methods family
* Added `EntryStream.peekKeys()`, `EntryStream.peekValues()`, `EntryStream.peekKeyValue()` methods
* Added construction of `EntryStream` from `List` or array (indices are used as keys)
* Added construction of `EntryStream` from two and three key-value pairs
* Added `EntryStream.append`/`prepend` for two and three key-value pairs
* Added `greater`/`less`/`atLeast`/`atMost` filter methods for primitive streams
* Updated documentation

### 0.2.2

* Fixed: `StreamEx.flatMapToEntry`, `EntryStream.flatMapKeys` and `EntryStream.flatMapValues` now correctly handles null value returned by mapper
* Added `StreamEx.scanRight()` and `EntryStream.scanRight()` methods
* Added `StreamEx.foldRight()` and `EntryStream.foldRight()` methods
* Added `StreamEx.forPairs()` method
* Added `StreamEx.partitioningBy()` methods
* Added `StreamEx.partitioningTo()` method
* Added `StreamEx.groupingTo()` methods
* Added `StreamEx.ofPermutations(int)` constructor
* Added `StreamEx.ofTree` constructors
* Added `StreamEx.without()`, `IntStreamEx.without()`, `LongStreamEx.without()` methods
* Added `EntryStream.join()` methods
* Updated documentation

### 0.2.1

* Fixed: `flatCollection` method now correctly handles null value returned by mapper
* Added `IntStreamEx.charsToString`, `IntStreamEx.codePointsToString` methods
* Added `StreamEx.scanLeft()` and `EntryStream.scanLeft()` methods
* Added construction of `EntryStream` by zipping keys and values from two arrays/lists
* Added construction of `StreamEx`/`IntStreamEx`/`LongStreamEx`/`DoubleStreamEx` by zip-mapping two arrays/lists
* Added `pairMap` method for handling adjacent pairs
* The `append`/`prepend` methods of `StreamEx`/`EntryStream` can accept a `Collection` now 
* Updated documentation

### 0.2.0

* Added `parallel(fjc)` method for all stream types
* Added `StreamEx.reverseSorted()` method
* Added `StreamEx.foldLeft()` and `EntryStream.foldLeft()` methods
* Added `IntStreramEx.toBitSet()` method
* Added construction of `IntStreamEx` from `char[]`, `short[]`, `byte[]` arrays
* Added construction of `DoubleStreamEx` from `float[]` array
* Updated documentation

### 0.1.2

* Added `IntStreamEx.elements` methods family
* Added construction of the constant stream
* Added `minBy`/`maxBy` methods family for primitive streams
* Updated documentation

### 0.1.1

* Fixed: `empty()` method of all the streams worked incorrectly when used several times
* Added `IntStreamEx.ofIndices` methods family
* Added `IntStreamEx.range(int)` and `LongStreamEx.range(long)`
* Added `StreamEx.ofNullable`
* Added construction of the streams from optionals
* Added construction of the streams from array subrange
* Updated documentation

### 0.1.0

Warning: this release introduces some changes which may break backwards compatibility

* `EntryStream.toMap(Supplier)` and `EntryStream.toMap(BinaryOperator, Supplier)` renamed to `toCustomMap`
* Added `StreamEx.toSortedMap` and `EntryStream.toSortedMap` methods family
* Methods producing `Map` use concurrent collector for parallel streams if possible
* Updated documentation