-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCHANGES
More file actions
409 lines (332 loc) · 38.2 KB
/
Copy pathCHANGES
File metadata and controls
409 lines (332 loc) · 38.2 KB
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
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
[2.1.9]
- Some fixes were applied to Junction and StringJunction for some rare cases.
- The dependency on digital is now 0.10.3, which only might have different output for one Interpolator type (the cubic Hermite spline, used by `smooth`). Everything else in that version is a new method, not a change.
[2.1.8]
- The hashMultiplier field (which really acts like a hash seed most of the time) now alternates between even and odd values as the set or map resizes. This allows more bits to change in colliding hash codes and hopefully help break up collisions when we resize. This changes the iteration order for unordered maps and sets, but not ordered ones.
[2.1.7]
- The addAll() method in hash-based sets and the putAll() method in hash-based maps now can take a faster path if the set or map is empty and another collection of the same type (and sometimes with other constraints, like the same load factor) is being entered into the set or map. This idea came from the Kotlin FastCollect library, which has excellent performance on this type of copying operation. No code from FastCollect is incorporated here; FastCollect uses Robin Hood hashing, while jdkgdxds uses linear probing, open addressed hash tables.
[2.1.6]
- The protected field `hashMultiplier` is back in maps and sets after it was shown by https://sooniln.github.io/posts/hashmap-benchmarks-2026/ that using just the upper bits of colliding hashCode()s, without changing the multiplier or the XOR value, stay colliding even in smaller maps. The new approach avoids collisions when colliding keys are inserted into a different size of map, and when the map resizes, any collisions that don't have identical hashCode()s may change.
- add() methods in EnhancedCollection and all primitive-backed lists, bags, and deques now can take up to 8 parameters without allocating varargs, instead of up to 4 before. EnhancedCollection returns a boolean to indicate if the collection was changed, because it can be used for sets, which may or may not change after a call to add(). Most implementations of EnhancedCollection.add() for multiple items ensure the capacity will fit once before adding any items.
- add() methods in IntSet, IntOrderedSet, LongSet, and LongOrderedSet can now take up to 8 parameters without allocating varargs. Unlike the other primitive-backed types, these return a boolean to indicate whether the set was modified (for a list, bag, or deque, add() always modifies the collection).
[2.1.5]
- jdkgdxds is now distributed via JitPack.io for stable releases as well as commit releases.
- The dependency on digital updated to 0.10.2. This should be identical to 0.10.1 other than coming from JitPack.io .
- Gradle updated to 9.6.0, which should only have internal effects, if any.
[2.1.4]
- CharFilter now provides hash() and hash64() methods that filter and edit the CharSequences or char arrays they are given.
- The dependency on digital updated to 0.10.1 . This includes some fixes in older Hasher methods (before "hashBulk" methods were added), and improves the precision of MathTools.cbrt().
- Gradle updated to 9.5.1, which should only have internal effects, if any.
[2.1.3]
- addAll() on deque types now increases capacity more in-line with how other types do, like lists, and won't increase capacity as often.
- remove() on deque types now actually uses the shortcut path for removing the tail, instead of only using the better implementation available when removing the head.
- The removeIf() method in all PrimitiveCollection types now has a more efficient implementation in each primitive list and deque.
- removeIf(ObjPredicate) is also available in ObjectDeque, but not ObjectList or ObjectBag, which can still use Collection.removeIf(Predicate) on any platform except RoboVM.
- Gradle updated to 9.5.0, which should only have internal effects, if any.
[2.1.2]
- The dependency on digital updated to 0.10.0 . This mostly affects the `Interpolations` class.
- There's a predefined `PartialParser` for `StringJunction` types now, instead of needing `Junction<String>` .
- Gradle updated to 9.4.0 (which should only affect this library internally). This allows building jdkgdxds with Java 26.
[2.1.1]
- [BREAKING] CaseInsensitive Maps and Sets now no longer have a protected `hashMultiplier` field, because its initialization order was a serious problem. They still have getters and setters for it in case classes extended it that used that API.
- All map entry set, key set, and value collection types now have re-entrant iterators, matching the behavior of iterators elsewhere since 2.0.0 .
[2.1.0]
- [BREAKING] The protected field `hashMultiplier` has been removed from most sets and maps, which no longer use it. However, the getter and setter for it are still present for compatibility, and used by some subclasses.
- The iteration order of non-Ordered sets and maps is likely to have changed. Ordered sets and maps will notice no change.
- The algorithm used by `place()` in most sets and maps is now faster and doesn't use a `hashMultiplier` variable, instead using a XOR and multiplication (using `BitConversion.imul()`). This is typically within 1-3% slower than libGDX does its sets and maps (with one `long` multiply) on desktop, but is resistant to linear patterns in `hashCode()`s. It is expected to be drastically faster on GWT, where the `long` math libGDX uses is very slow.
- Many pieces of documentation for `toString()` and `appendTo()` have been updated and cleaned up to correctly refer to Appendable CharSequence instead of just StringBuilder.
- When a temporary StringBuilder is created for a data structure's toString() result, it starts with an initial capacity based on that data structure's size, rather than always using 32 or the default for StringBuilder.
[2.0.1]
- Casing received a fix for the GWT target. This allows jdkgdxds to be used with GWT again.
[2.0.0]
- [BREAKING] The behavior of iterators has changed; they are no longer reused, which makes them act like more-normal JDK collections.
- [BREAKING] In Map iterators over Entry Sets, the Entry is no longer modified in-place; a new Entry is produced at each iteration. This should lead to less confusion during debugging.
- FilteredString Sets and Maps now use a different set of hash multipliers; they seem optimal for English dictionary words and many proper nouns.
[1.14.1]
- The dependency on digital has been updated to 0.9.9 . This is a GWT bug-fix update, and allows the library to work on GWT again. (0.9.8 was broken on GWT.)
[1.14.0]
- [BREAKING] CharBitSet was renamed to CharBitSetFixedSize and now always uses a table with 2048 ints, as a way to avoid some extra checks at runtime.
- [BREAKING] CharBitSetResizable was renamed to CharBitSet, since it acts more how a bit set is expected to act (and be resizable still).
- There's better feature parity between CharBitSetFixedSize and CharBitSet now, and more methods are implemented in both.
- CharPredicates uses Java 25's Character data now.
- The dependency on digital has been updated to 0.9.8 . This includes TrigTools improvements and some additions to BitConversion.
[1.13.2]
- CharBitSetResizable was added, which acts a lot like CharBitSet but doesn't use 2048 ints in a table by default, and can be much smaller.
- The internal Casing class is much smaller in file size now, because it uses a different technique to store its contents. It was previously one of the largest, if not the largest, class here in the JAR.
[1.13.1]
- The dependency on digital has been updated to 0.9.5 . This is a small update that adds features to RoughMath and Distributor without changing existing code.
- The smaller Utilities.HASH_MULTIPLIERS table is now used where possible instead of Utilities.GOOD_MULTIPLIERS, though GOOD_MULTIPLIERS is still here untouched. The larger table is still used in some places.
[1.13.0]
- [BREAKING] All nullity annotations have been removed. We were already doing substantial null-checking because the annotations aren't very effective at eliminating that, and forcing users to depend on an annotations dependency isn't a very good policy. Having nullity annotations on almost everything hampered readability, also.
- Appender compiles again on GWT 2.11.0; in at least some earlier versions, a GWT bug or behavior difference prevented `ENUM_NAME_APPENDER` from compiling. TeaVM was unaffected, which is why the bug escaped notice.
- Utilities.GOOD_MULTIPLIERS changed so at least in some cases, there are fewer collisions by a substantial factor (fewer than half the collisions in one large input set). The set of multipliers is a mix of the best ones from earlier, with others found by generating thousands of multipliers with close-to-16 bit counts and seeing which ones didn't cause as many collisions.
- Various mistakes in JavaDoc strings have been fixed.
[1.12.4]
- The dependency on digital has been updated to 0.9.4 . This is a non-breaking update that should fix a (potential) compilation issue on RoboVM. The previous 0.9.3 release is also non-breaking, and adds some small features.
[1.12.3]
- [BREAKING] The `api` dependency on Checker Framework has been replaced with a `compileOnly` dependency on JetBrains Annotations. Libraries using jdkgdxds will no longer have access to Checker's annotations `NonNull` and `Nullable`, but can replace them with JetBrains annotations `NotNull` and `Nullable`. This saves about 210 KB from each fat JAR produced.
[1.12.2]
- [BREAKING] The change starting in 1.12.0 that moved parameters from `StringBuilder` to generic types that are both `Appendable` and `CharSequence` wasn't completed for `PrimitiveCollection` default methods; now all PrimitiveCollection types use the Appendable CharSequence parameter.
- Almost every data structure that can be converted to a legible String now provides static parse() methods that can recreate the data structure from that String, potentially needing one or two PartialParser instances to parse objects.
- More PartialParser generator functions are provided as static methods in PartialParser.
- CharBitSet is new, and acts like an even simpler version of OffsetBitSet for char items. It is also a CharPredicate that can be used to check if it contains a char.
- CharPredicates defines several CharPredicate constants (using CharBitSet) that work identically to OpenJDK 24 on all target platforms (including GWT and RoboVM).
[1.12.1]
- Dependency on digital updated to 0.9.2; this is a hotfix for bugs in the behavior of scrambled Base objects, and is unlikely to affect most applications.
[1.12.0]
- [BREAKING] "Appender" functional interfaces in `com.github.tommyettinger.ds.support.util` now can't be StringBuilder method references, but can take more than StringBuilder as their first parameter (this is a change throughout the ecosystem in this update). Any type that is both a CharSequence an Appendable can work, such as StringBuffer and CharBuffer as well as CharList and CharDeque here.
- [BREAKING] You should usually use `Appender::append` instead of `StringBuilder::append` when you need a generic `Appender`.
- Dependency on digital updated to 0.9.1; this affects the signatures of various appending methods, which now can take more than just StringBuilder.
- CharList, CharBag, and CharDeque now implement CharSequence and Appendable, allowing them to be used with more appending methods.
- CharList, CharBag, and CharDeque, which are all `CharList` types, now implement `Comparable<CharList>` as well. They can't be Comparable to an arbitrary CharSequence, or to String, because Comparable requires the other way to work as well, and a String can't be compared to a non-String directly.
- The new compareWith() method on CharList and subtypes allows comparing a CharList to an arbitrary CharSequence, like `CharSequence.compare()` in Java 11 and later.
- A LOT of methods have been added to CharList, CharBag, and CharDeque, mostly to get close to feature parity with libGDX 1.13.6 CharArray, which replaced libGDX' custom StringBuilder class.
- New String-related methods for the Char-collections include substring(), leftString, rightString(), and constructors.
- Various new methods have case-insensitive versions as well, such as compareWith(), indexOf, lastIndexOf(), an contains(), which all can take `CharSequence`s.
- ObjectList.sortJDK() should now work on RoboVM... by not calling List.sort(), which doesn't exist in the paleolithic API era RoboVM uses. It has to use ObjectComparators and its non-allocating in-place mrge sort, which is slower.
- ObjectDeque.sortJDK() is new and works everywhere by using Arrays.sort() on its items array. It uses TimSort, which is generally faster than ObjectComparators, but allocates some memory and may affect the GC.
- Sorting in general has improved for all lists and deques.
- There is a `sort(int, int)` that uses ascending order for a subrange now for all lists.
- Sorting subranges of deques doesn't need to rearrange the deque internally (which is O(n)) if the subrange is continuous in the items array.
- List, Bag, and Deque types have replaceFirst() and replaceALl() methods now.
- Float and double-based lists/bags/deques have variants on replaceFirst() and replaceAll() that can replace within a given tolerance or replace NaN specifically.
[1.11.0]
- [BREAKING] The constructors in any and all Ordered types that took a `boolean useDequeOrder`, if present, now take an `OrderType` enum, which allows specifying the default LIST ordering, the optimized-removal-and-insertion-at-ends DEQUE ordering, or now the unreliable-but-fast-deletion BAG ordering.
- OrderType is new, and all Ordered types can have their order type queried with `getOrderType()` . This is not stored in the types except by the specific subclass that their `order()` returns.
- `EnhancedCollection`s and `PrimitiveCollection`s can now `addLegible()` to add the contents of a `toString()` call to that data structure. All maps where it is relevant can call `putLegible()`, as well.
- Where reading in the result of `toString()` is not obvious to the library, you can supply a `PartialParser` implementation that reads a section of a String and returns an Object of the desired type.
[1.10.1]
- Dependency on digital updated to 0.7.0; this version change doesn't directly affect jdkgdxds, but calls to `TrigTools` methods may have very slightly different results because its lookup tables are calculated differently (now they are fully deterministic).
- Instead of creating a method reference to StringBuilder::append, which allocates on Android due to a flaw in R8, each primitive Appender now stores one method reference, DEFAULT, that is equivalent to StringBuilder::append .
- In addition to DEFAULT in each primitive Appender interface, there is also DENSE, which produces non-human-readable but tightly-packed BASE90 strings. These are also easier to read.
- Each PrimitiveCollection type can now use toDenseString(), denseAppendTo(), addDense(), readDense(), and readArrayDense(). These work on the aforementioned BASE90 strings.
- Each PrimitiveCollection type, and also EnhancedCollection somewhat, can use addVarargs() to add 0 or more items, or an array. These could be used by with() methods taking varargs, but it isn't needed.
- As a counterpart to with() taking varargs in various map types, there is now a putPairs() method that acts like that with() and takes an Object array, Number array, or something like that, organized as key, value, key, value...
- EnhancedCollection now can add arrays to the collection using addAll(), a bizarre omission from earlier versions.
- Null checks have been added for most places in case Checker Framework annotations aren't sufficient.
- GWT works again; Lisque and Deque had used `<@Nullable T>` as their generic type, which GWT can't handle (TeaVM has no trouble either way).
[1.10.0]
- Most hashed collections switched back from the xor-rotate-xor-rotate approach and use the earlier multiply-shift implementation for place(). This differs from before in that hashMultiplier is usually determined now by the map's/set's shift value, unless setHashMultiplier() changed it.
- This changed back because the multiplication and shift approach seems more resilient when hashCode() results are very low-quality.
- The hashMultiplier field is back, and now getHashMultiplier will return it, while setHashMultiplier can set it to (usually) any odd, negative int.
- For hashCode(), ordered sets now don't iterate over the whole hashtable when they can just iterate over the ordered items.
[1.9.2]
- Fixed significant bugs with ensureGap() and some removal methods in all Deque types.
[1.9.1]
- Fixed an issue on recent JDKs where SequencedCollection defined conflicting types for a new default method, `reversed()`, shared by List and Deque.
- Almost immediately superseded by 1.9.2.
[1.9.0]
- [LIKELY BREAKING] All primitive-backed deques have been updated to use the same algorithms as ObjectDeque's updated version from 1.8.1.
- The primitive-backed deques now extend their primitive-backed list counterpart, such as ShortDeque extending ShortList.
- Because IntDeque and LongDeque extend IntList and LongList, Ordered.OfInt and Ordered.OfLong sets and maps can now be configured at construction to use the deque subclass instead of the list.
- Several bugs were fixed in ensureGap(), affecting all deque types, mostly in rare cases.
- A serious bug was also fixed in addAllFirst() in all deques, where the size wouldn't always be updated correctly.
[1.8.1]
- [BREAKING] Methods in EnhancedCollection that took Iterable types, not Iterator or Collection, have all been renamed to have "Iterable" at the end of their method name, to avoid overlap with methods that take Collection.
- [LIKELY BREAKING] ObjectDeque has been rewritten almost entirely as both a List and Deque, while also implementing RandomAccess, Arrangeable, and EnhancedCollection. It extends AbstractList, which gives it comparable features to ObjectList, plus additional features from being a Deque. It also adds quite a lot more functionality! The primitive deque types have not yet been updated.
- For very large hash tables (used by most set and map types here), the capacity was calculated using float (single) precision instead of double, which would have sometimes led to unnecessary resizes. This bug was found in fastutil by Captain-S0L0 .
- Casing, an internal class used to quickly convert lower-case letters to upper-case for case-insensitive code, has been updated to Unicode 16, which is used by Java 24.
- The dependency on digital is now 0.6.2, which has a few changes to improve approximation precision, but nothing else should change results.
[1.8.0]
- [SEED BREAKING, MAYBE] The dependency on digital is now 0.6.0, which changes the output of methods in Hasher with "Bulk" in their names. Those methods also pass more stringent testing than before.
- Several new methods were added to EnumSet and EnumMap.
- EnumOrderedSet and EnumOrderedMap are present now, and are insertion-ordered counterparts to EnumSet and EnumMap.
- There are also maps from Enum to each of primitive int, primitive long, and primitive float, including ordered maps.
[1.7.2]
- Junction (and its supporting interface Term) are new in this version. They can be used as a type of predicate to match multiple items in a Collection.
- A Junction can be parsed from a String, creating several Terms and their relationships. This can produce any type that a supplied function can convert from a String.
[1.7.1]
- Fix automatic serialization of IntSet (when not using a serializer that knows how primitive sets work).
- Fix resize() in all Filtered types (including Iterable and String, Sets and Maps).
- Fill out the missing with() methods in `FilteredIterable(Ordered)?(Set|Map)`.
- Use the standard definition of set equality for NumberedSet, HolderSet, and HolderOrderedSet.
[1.7.0]
- [BREAKING] Set and map types no longer guarantee they will have a `hashMultiplier` field, though the getters and setters for that field still exist.
- Some set and map types do still have a `hashMultiplier` field, and are mostly unaffected by the above breakage, including all Filtered and/or CaseInsensitive sets and maps.
- The first change means classes like ObjectSet and IntFloatMap no longer use hash function *families* to mix hash codes, and instead use a multiplication-free bitwise mixer.
- The `remove()` method in maps and sets changed slightly internally, and should be faster. It uses a complex technique that was pulled from Fastutil and seems to have a small speed benefit.
- There are many more overloads of `with()` now; this avoids allocating any array when passing 8 or fewer parameters (for 8 items in a set, or 4 key-value pairs in a map).
- A CharFilter can be used to construct FilteredString sets and maps, or ordered variants, that use that same CharFilter. Use `makeSet()`, `makeMap()`, `makeOrderedSet()`, or `makeOrderedMap()` for this; these act like `with()` but don't need another CharFilter to be looked up.
- OffsetBitSet now uses `int` internally instead of `long`, because GWT is so much slower with `long` math. Various other fixes were applied to OffsetBitSet.
- Some improvements to nullity handling.
- Updated to digital 0.5.4 . This release makes some changes to how Distributor behaves.
- The Gradle version used to build jdkgdxds was updated to 8.11.1, and the daemon was re-disabled while building. This shouldn't affect users.
[1.6.5]
- Added LimitingIterator, which will only iterate through a set amount of items at most.
- Updated to digital 0.5.2, which mostly adds the Distributor class.
- The Gradle version used to build jdkgdxds was updated to 8.10.2, and the daemon was re-enabled while building. This shouldn't affect users.
[1.6.4]
- Most collections can be initialized with an Iterator now, which adds items from the Iterator until it is exhausted.
- You can also use Iterator types in addAll(), removeAll(), and so on.
- There are new Iterator wrappers, including FilteringIterator, StridingIterator, EditingIterator, and primitive variants on each.
- FilteringIterator skips items unless they match a predicate.
- StridingIterator skips a fixed number of items at a time, repeatedly.
- EditingIterator runs a function on each item and returns what that function does.
- Updated to digital 0.5.1, which mostly improves and adds to its Hasher class.
- The Gradle version used to build jdkgdxds was updated to 8.10.1, and the daemon was disabled while building. This shouldn't affect users.
[1.6.3]
- The dependency on digital was updated to 0.5.0, which improves Interpolators and parts of TrigTools.
- The Gradle version used to build jdkgdxds was updated to 8.10, which will allow this to be built with Java 23.
[1.6.2]
- [BREAKING] Because using BitConversion.imul() didn't benchmark as having any speed penalty, but there were potentially-significant collision issues with small hashCode()s and smaller GWT-friendly multipliers, the Utilities.GOOD_MULTIPLIERS table now stores 32-bit ints instead of 21-bit ones. Again.
[1.6.1]
- [SEED BREAKING] Utilities.hashCodeIgnoreCase() returns different results in this version than in the previous version, with the same seed. This has to do with the next bullet point.
- Utilities.GOOD_MULTIPLIERS now holds only smaller ints, which allows place() to avoid calling imul() entirely. This may have some speed implication on any platform, but most likely a small one.
[1.6.0]
- [BREAKING] The protected hashMultiplier field is now an int instead of a long, and it is initialized differently. It also changes differently in resize().
- [BREAKING, MAYBE] Utilities.GOOD_MULTIPLIERS is now an int array instead of a long array, with different contents. This array was unlikely to be used externally, but it is always possible.
- All hash-based collections (maps and sets) now avoid math on longs if possible, because GWT is so slow with long math. This changes the iteration of sets and maps that aren't Ordered, but that iteration wasn't expected to be reliably-ordered anyway.
- There is now an int-based Utilities.hashCodeIgnoreCase() in addition to a Utilities.longHashCodeIgnoreCase().
[1.5.4]
- [BREAKING, SORT OF] PrimitiveCollection.areEqual() was broken, apparently since it was created, and has either been removed where it wasn't properly applicable, or changed to equalContents() for set-like types.
- Massive addition of toString() and related appendTo() code to nearly all classes here.
- PrimitiveSet is a new interface that, like Set in the JDK, marks a PrimitiveCollection as behaving like a Set rather than a List, Deque, or plain Collection.
- EnumMap and EnumSet now allow you to call getUniverse() to get their key universe, most likely to pass it to another EnumMap or EnumSet.
- Updated funderby dependency to 0.1.2 .
- Internally, updated Gradle to 8.8 .
[1.5.3]
- Fixed a bug that affected ObjectDeque.clear(), and could have resulted in crashes.
[1.5.2]
- New EnumMap and EnumSet types are meant to be serializable more easily than their JDK counterparts.
- Updated digital dependency to 0.4.8 .
[1.5.1]
- Almost immediately replaced by 1.5.2.
[1.5.0]
- Almost immediately replaced by 1.5.2.
[1.4.8]
- Deque types can be initialized with capacity 0, and now won't suddenly crash when an item is added.
- Almost every type got some new methods, thanks to PrimitiveCollection adding overloads that take arrays or ranges of arrays.
- The above change was also applied manually to Object-based Collection types.
- Where appropriate, types have removeAll() and removeEach(), as well as containsAll() and containsAny().
[1.4.7]
- The dependency on digital was updated to 0.4.7, which adds some potentially useful features, and has many more null checks.
- Filtered sets and maps have the full range of constructors that maps and sets usually have, now.
- The Filtered-String sets and maps use a different hashing algorithm now that takes advantage of how small a char is relative to a long.
[1.4.6]
- [BREAKING CHANGE] The Filtered-String sets and maps now use a CharFilter object to group their filter and editor, allowing them to be serialized and deserialized.
[1.4.5]
- The dependency on digital was updated... again... to 0.4.5, though this time it brings several new features. None used here.
- Filtered-String sets and maps! These are like the CaseInsensitive ones, but allow configuring how characters are used and modified.
- Filtered-Iterable sets and maps, too! These are like the Filtered-String ones but work on an Iterable of sub-items instead of a String of characters.
- FilteredComparators provides ways to sort the ordered filtered types.
- NumberedSet.addOrIndex() was broken, and now is fixed.
- Nullity annotations were put in the right places pretty much everywhere.
[1.4.4]
- The dependency on digital was updated again to 0.4.3 because of a break in GWT compilation in digital 0.4.2; it is fine now.
[1.4.3]
- The dependency on digital was updated to 0.4.2, which includes `BitConversion.countTrailingZeros()`; we use it in OffsetBitSet.
- A bug in getAndIncrement() for ordered maps with int and long keys was fixed; before, it didn't handle zero keys correctly.
- The `Utilities.longHashCodeIgnoreCase()` methods now are much closer to how `Hasher` implements them in digital; the results are different.
[1.4.2]
- The dependency on digital was updated to 0.4.1, which includes a new `BitConversion.countLeadingZeros()` method that we use here to speed things up on GWT a bit.
- The dependency on checker-qual was updated to 3.39.0, which shouldn't break or really even change anything here.
[1.4.1]
- [POSSIBLE BREAKING CHANGE] The dependency on digital was increased to 0.4.0, and that version changes what `Hasher.hash()` and `Hasher.hash64()` return for the same arguments. This doesn't affect jdkgdxds code, but may affect users who rely on digital transitively.
- New `ObjectList.sortJdk()` method will use the default `List.sort()` method rather than the in-place mergesort used by `ObjectList.sort()`.
- Updated to Gradle 8.3 and Checker Framework 3.37.0 .
[1.4.0]
- [BREAKING CHANGE] Optionally-implemented merge() methods on primitive-keyed-and-or-valued map types didn't act according to Map.merge() docs, so they are now renamed to combine(). Calling combine() should always take a funderby functional interface.
- All maps should be able to be combined with another map of the same type, using combine(). This complements the combine() that merges two values to associate with a single key.
- No-arg overloads of with() are present on most maps now. Sets could already handle the no-arg case.
- The test sources have a com.github.tommyettinger.ds.enums package that holds enum-keyed maps and sets, which can be copied into your code if you want them. They're probably slightly more efficient than using an Object-keyed map with enums.
[1.3.2]
- Updated dependency on digital to 0.3.3 because it has a critical fix for GWT projects. Other targets are unaffected.
[1.3.1]
- Removed extra Gradle dependency on digital and funderby sources JARs; this sometimes caused issues in downstream projects.
[1.3.0]
- [BREAKING CHANGE] Updated Funderby to 0.1.0; this update removes some unnecessary ThingToBoolean types, so is sort-of incompatible if you use those instead of ThingPredicate types. Lambdas will just be equivalent to the ThingPredicate types.
- [BREAKING CHANGE] All Java 8 APIs in the project have been replaced by versions defined here or in Funderby; this should help RoboVM compatibility.
- [BREAKING CHANGE] While in earlier versions, FloatIterator from this library was mixed with PrimitiveIterator.OfInt/OfLong, now all iterator types are defined here for RoboVM compatibility. They are all in the package com.github.tommyettinger.ds.support.util .
- None of the primitive iterators implement the Java 8 PrimitiveIterator interface, but they all do implement Iterator.
- The Override annotation is still present on some overrides of methods added in Java 8, but RoboVM seems to ignore Override.
[1.2.2]
- Fix the clear() method in primitive-keyed maps, which previously did not remove the 0 key.
- In IntObjectMap, LongObjectMap, and their Ordered relatives, values are now set to null when clear() is called, to permit garbage collection.
[1.2.1]
- Fixed ObjectList.equals(); in 1.2.0 it would almost never return true.
[1.2.0]
- [BREAKING CHANGE] The insertRange() method in the primitive lists is now named the duplicateRange() method, as it was in ObjectList already.
- [BREAKING CHANGE] Several sorting methods in BooleanList have (finally) been moved to BooleanComparators, which was done for other primitive types much earlier.
- There is now an unordered Bag class that extends each List class here.
- General cleanup was done on the various List classes, so they're all more similarly-structured inside.
- The retainAll() method in primitive lists now can receive any PrimitiveCollection of the appropriate type.
- In the equals() and equalsIdentity() methods for lists, a list (or bag) being unordered will no longer disqualify it from equality comparison.
- digital has been updated to 0.2.0 .
[1.1.3]
- [BREAKING CHANGE] The .gwt.xml file has moved to `src/main/resources/com/github/tommyettinger/jdkgdxds.gwt.xml` in the repo.
- [BREAKING CHANGE] In GWT projects, you must now depend on jdkgdxds using `<inherits name="com.github.tommyettinger.jdkgdxds" />` .
- digital has been updated to 0.1.8, and its inherit also changed.
- funderby has been updated to 0.0.2, and its inherit also changed.
[1.1.2]
- Immediately replaced by 1.1.3, above.
[1.1.1]
- [BREAKING CHANGE] The dependency on JSR305 (for nullity annotations) has changed to checker-qual.
- The strategy for choosing a hashMultiplier (for maps and sets) is more robust now, and chooses from a large array of known-good multipliers.
- Added IdentitySet and IdentityOrderedSet.
- Several fixes in HolderSet and HolderOrderedSet.
[1.1.0]
- OffsetBitSet is the main new addition in this version; it is a fairly standard bitset, so it acts like an implicitly sorted int set, but unlike typical bitsets, it allows choosing an offset where it should start permitting items.
- ObjectComparators can sort Object arrays now.
- Sets have an appendTo() method that places some or all of the String representation into a StringBuilder, with minimal allocation.
- The iterators for sets, for map entry sets, for map key sets, and for map value collections all can produce a list of the remaining items, with toList() .
- In addition to the above toList() , there is appendInto() for those iterators, which allows placing the remaining items from the iterator into any compatible collection.
- To make the iterators' new methods more useful, you can call resetIterator() on a map's entry set/key set/value collection, which sets the iterator back to the start.
- jdkgdxds depends on digital version 0.1.5 now. If you use juniper, using 0.1.7 or higher is suggested (that's what the tests use here).
[1.0.5]
- Many fixes for deques, affecting/improving removeAt(), add() with an index, iteration, and default values.
- The iterators for all lists, all deques, and for NumberedSet are all effectively ListIterators now, or share the same API. If you need a ListIterator for an ordered set or an ordered map's keys, call .order().iterator() .
[1.0.4]
- [BREAKING CHANGE] jdkgdxds now depends on funderby (version 0.0.1), a small new library that only contains primitive-based functional interfaces. This replaces the functional interfaces for primitives here. This is breaking because the package changed for the functional interfaces.
[1.0.3]
- [BREAKING CHANGE] jdkgdxds no longer depends on juniper. The one case where we still used it was in Arrangeable.rearrange(EnhancedRandom), which now takes a long seed instead.
- The simple random hash family now incorporates the current size of the map or set at the time of a resize.
[1.0.2]
- No more Fibonacci hashing; now we use a simple random hash family that changes hash function on resize.
[1.0.1]
- [SMALL BREAKING CHANGES] The core math code in BitConversion is now part of its own small math utility library, `digital`. It is a dependency.
- [SMALL BREAKING CHANGES] EnhancedRandom is now an abstract class, and has moved to the dependency `juniper`. All generators have also moved.
- [BREAKING CHANGE] The shuffle() method in EnhancedRandom that took an Arrangeable has been moved to Arrangeable, taking an EnhancedRandom.
[1.0.0]
- See 1.0.1 .
[0.2.8]
- New truncate() method on maps and sets allows removing items aggressively to fit a desired smaller size.
- The shrink() method in maps and sets now does extra checks to prevent a failure state with many more items than the load factor allows.
[0.2.3]
- [BREAKING CHANGE] EnhancedRandom.nextInt(int, int) and nextSignedInt(int, int) were still broken when outerBound was less than innerBound; this has been fixed, but these methods will return different values now.
- Fix the iterators for int- and long-keyed maps; there was a name-shadowing issue that made iteration stop immediately in some non-empty maps.
- Added BooleanDeque, rounding out the primitive deques.
- Added with(), minHeapWith(), and maxHeapWith() to BinaryHeap, to make building one a little easier.
[0.2.2]
- The recently-added Base class wasn't case-insensitive when it was supposed to be, and now it is correct.
[0.2.1]
- [BREAKING CHANGE] EnhancedRandom.nextInt(int, int) and nextSignedInt(int, int) were sometimes broken with two very-distant arguments, but now behave correctly. This changes the output of two-argument calls only.
- The nice, human-readable natural sort is available as an option in NaturalTextComparator.
- Int and long hashing is back to using Fibonacci hashing, because not having it showed severe performance loss on some key sets.
- New StrangerRandom number generator doesn't use multiplication and is fairly fast/very-high-quality.
- Added the Xoshiro256** random number generator, which is present in Java 17 but unavailable to non-desktop platforms without this or similar code.
- Base provides configurable numeral base systems, such as hexadecimal and base-64, along with the option to scramble the base for light obfuscation.
[0.2.0]
- Fixed how `ObjectArray.sort()` works on Android across all versions. This was a potentially serious problem because of flaws in the Android library design.
- Added FourWheelRandom as yet another choice of EnhancedRandom; this is the fastest so far on Java 16 with HotSpot, and has four `long`s of state.
- Many convenience methods and important constructors in the deque classes, such as `with()` and copy constructors.
- EnhancedRandom now optionally provides a `previousLong()` method, which steps the generator backwards; all generators here implement it.
- There is now an equate() method that can be overridden in all maps and sets, to change how equality is compared. This replaces the usage of locateKey() for the same task.
- This release does not use Fibonacci hashing for any keys, though comments show how to implement it.
[0.1.3]
- [BREAKING CHANGE] TricycleRandom needed its algorithm changed to improve its quality for some problem seeds; performance is pretty much unaffected.
- Deque types everywhere! These are double-ended queues that also allow getting and setting internal items in constant time, though not inserting into the middle.
- There are primitive Deque types too, for all types but boolean (there's no space savings for using booleans over bytes, and we have a ByteDeque).
- The `nextGaussian()` method in EnhancedRandom is different and faster now, avoiding a call to `probit()` by using an approximation by Marc B. Reynolds.
- Internal sorting code has been moved to the `com.github.tommyettinger.ds.support.sort` package, in the Comparators classes; this lets sorting apply to deques.
[0.1.2]
- [BREAKING CHANGE] The `setIndex()` methods in the ordered maps have been renamed to `setAt()` because they don't affect any index.
- The `putOrDefault()` and `getAndIncrement()` methods in ordered maps have been fixed or improved.
- There are `first()` methods in all PrimitiveCollection types now, which can be used even if the type isn't ordered (which gets an arbitrary item in that case).
- EnhancedRandom has some new methods; `equals()` and `toString()` are always useful, and `setWith()` allows copying another EnhancedRandom into the current one.
- DistinctRandom provides another choice of EnhancedRandom; it can't produce the same value twice without being reseeded or years of random number generation passing.
[0.1.1]
- [BREAKING CHANGE] Randomized algorithms no longer use a `java.util.Random`, and instead take a `com.github.tommyettinger.ds.support.EnhancedRandom`.
- API addition: EnhancedRandom#nextInclusiveDouble(), EnhancedRandom#nextExclusiveDouble(), float versions of those, and Equidistant versions are all added.
- GWT support has been fixed; it probably never worked before.
[0.1.0]
- First release published to Maven Central.