From f32624d131e0d3ac5b922e73c3501a17e7666ed6 Mon Sep 17 00:00:00 2001 From: Speiger Date: Tue, 14 Dec 2021 09:05:25 +0100 Subject: [PATCH] Build Release.. -Fixed: Doc error on gradle build. -Fixed: SubSet.iterator had a ambiguity. --- Changelog.md | 1 + README.md | 22 +++++++------------ build.gradle | 2 +- .../maps/impl/misc/ArrayMap.template | 6 ++--- .../templates/sets/AVLTreeSet.template | 2 ++ .../templates/sets/ArraySet.template | 6 ++--- .../templates/sets/RBTreeSet.template | 2 ++ 7 files changed, 20 insertions(+), 21 deletions(-) diff --git a/Changelog.md b/Changelog.md index 085219ef..27047425 100644 --- a/Changelog.md +++ b/Changelog.md @@ -5,6 +5,7 @@ - Added: Another 150k Unit tests. - Added: List and Set Unit tests for Integer (or Primitives in this case) to ensure basic stability there. (Now covering all sets and lists) - Fixed: Bugs with null values for primitive collections. +- Removed: ArraySet/Map subSet/subMap implementation was removed. ### Version 0.5.0 - Added: 2 Helper functions to find out how many bits are required to store a Number. diff --git a/README.md b/README.md index d39b25ab..8511af6e 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ But its focus is a different one. ## Main Features: - ArrayLists / LinkedLists -- HashSet/Map (Linked & HashControl) -- TreeSet/Map (RB & AVL) -- EnumMap +- HashSets/Maps (Linked & HashControl) +- TreeSets/Maps (RB & AVL) +- EnumMaps - Immutable Maps/Lists/Sets -- Priority Queue +- Priority Queues - Streams & Functional Queries - SplitIterators - Iterators @@ -22,18 +22,11 @@ But its focus is a different one. ## Current Level of Stability Since this is a relatively new Library, stability was not perfect and some areas are not perfect yet. -Thanks to [ben-manes](https://github.com/ben-manes) we now have Roughly 16000 test covering Maps/Sets/Lists. +Thanks to [ben-manes](https://github.com/ben-manes) we now have Roughly 160k unit test covering Maps/Sets/Lists. These tests cover Javas Collection API completely and ensuring a Stable implementation. These freshly added tests allowed me to squash thousands of issues according to Googles Test Library (Guava-Tests). These will be expanded on as time goes on. -One know aspect of Instability is SubSets and SubMaps. They require full rewrites to be fully stable. -So it is not advised to use them until these issues are addressed. -PriorityQueues are tested separately and ensure basic functionality though GuavaTests are planned. -They just require a custom test implementation. - -As a summary: Stability is good/excellent, unless you need SubSets/SubMaps - ## Specialized Functions New Specialized functions that were added to increase performance or reduce allocations or Quality Of life. To highlight things that may be wanted. @@ -47,6 +40,7 @@ To highlight things that may be wanted. - reduce/limit/peek/distinct: Light Versions of the Stream variant, to reduce Stream usage. - pour: a function that allows to collect all elements within the Collection - Collection: + - addAll: addAll array version - containsAny: Allows to test if another collection contains an of the elements of the tested collection. - primitiveStream: Provides access to the closest Java Stream Type. - copy: shallowCopies the collection, used instead of clone because this is better to use. @@ -95,13 +89,14 @@ repositories { } } dependencies { - compile 'de.speiger:Primitive-Collections:0.5.0' + compile 'de.speiger:Primitive-Collections:0.5.1' } ``` Direct: | Version | Jar | Sources | Java Doc | |--------- |------------------------------------------------------------------------------------------------------------------------------ |-------------------------------------------------------------------------------------------------------------------------------------- |-------------------------------------------------------------------------------------------------------------------------------------- | +| 0.5.1 | [Download](https://maven.speiger.com/repository/main/de/speiger/Primitive-Collections/0.5.1/Primitive-Collections-0.5.1.jar) | [Download](https://maven.speiger.com/repository/main/de/speiger/Primitive-Collections/0.5.1/Primitive-Collections-0.5.1-sources.jar) | [Download](https://maven.speiger.com/repository/main/de/speiger/Primitive-Collections/0.5.1/Primitive-Collections-0.5.1-javadoc.jar) | | 0.5.0 | [Download](https://maven.speiger.com/repository/main/de/speiger/Primitive-Collections/0.5.0/Primitive-Collections-0.5.0.jar) | [Download](https://maven.speiger.com/repository/main/de/speiger/Primitive-Collections/0.5.0/Primitive-Collections-0.5.0-sources.jar) | [Download](https://maven.speiger.com/repository/main/de/speiger/Primitive-Collections/0.5.0/Primitive-Collections-0.5.0-javadoc.jar) | | 0.4.5 | [Download](https://maven.speiger.com/repository/main/de/speiger/Primitive-Collections/0.4.5/Primitive-Collections-0.4.5.jar) | [Download](https://maven.speiger.com/repository/main/de/speiger/Primitive-Collections/0.4.5/Primitive-Collections-0.4.5-sources.jar) | [Download](https://maven.speiger.com/repository/main/de/speiger/Primitive-Collections/0.4.5/Primitive-Collections-0.4.5-javadoc.jar) | | 0.4.4 | [Download](https://maven.speiger.com/repository/main/de/speiger/Primitive-Collections/0.4.4/Primitive-Collections-0.4.4.jar) | [Download](https://maven.speiger.com/repository/main/de/speiger/Primitive-Collections/0.4.4/Primitive-Collections-0.4.4-sources.jar) | [Download](https://maven.speiger.com/repository/main/de/speiger/Primitive-Collections/0.4.4/Primitive-Collections-0.4.4-javadoc.jar) | @@ -134,5 +129,4 @@ to build the jar: do not combine the commands because they can not be executed at the same time. ## Current Down Sides (Random order) -- SubMaps/Set implementation isn't perfect right now. This will be addressed slowly due to rewrites required. - Documentation is only present at the lowest level for most cases and needs a typo fixing. \ No newline at end of file diff --git a/build.gradle b/build.gradle index 2d47a244..afd86fce 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ repositories { } archivesBaseName = 'Primitive Collections' -version = '0.5.0'; +version = '0.5.1'; sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' diff --git a/src/builder/resources/speiger/assets/collections/templates/maps/impl/misc/ArrayMap.template b/src/builder/resources/speiger/assets/collections/templates/maps/impl/misc/ArrayMap.template index 74629f10..c400abd7 100644 --- a/src/builder/resources/speiger/assets/collections/templates/maps/impl/misc/ArrayMap.template +++ b/src/builder/resources/speiger/assets/collections/templates/maps/impl/misc/ArrayMap.template @@ -596,7 +596,7 @@ public class ARRAY_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_GEN * Unsupported for now. Implementation is buggy and does not support the Java Standard with these functions. * It is a Unsorted Sorted Map. Thats why the SubMap implementation will be disabled until a better solution is found. * To give a simple reason: LinkedHashMaps are also not SortedSets even so they could be. - * @throws UnsupportedOperationException + * @throws UnsupportedOperationException because it is not supported */ @Override public SORTED_MAP KEY_VALUE_GENERIC_TYPE subMap(KEY_TYPE fromKey, KEY_TYPE toKey) { throw new UnsupportedOperationException(); } @@ -605,7 +605,7 @@ public class ARRAY_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_GEN * Unsupported for now. Implementation is buggy and does not support the Java Standard with these functions. * It is a Unsorted Sorted Map. Thats why the SubMap implementation will be disabled until a better solution is found. * To give a simple reason: LinkedHashMaps are also not SortedSets even so they could be. - * @throws UnsupportedOperationException + * @throws UnsupportedOperationException because it is not supported */ @Override public SORTED_MAP KEY_VALUE_GENERIC_TYPE headMap(KEY_TYPE toKey) { throw new UnsupportedOperationException(); } @@ -614,7 +614,7 @@ public class ARRAY_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_GEN * Unsupported for now. Implementation is buggy and does not support the Java Standard with these functions. * It is a Unsorted Sorted Map. Thats why the SubMap implementation will be disabled until a better solution is found. * To give a simple reason: LinkedHashMaps are also not SortedSets even so they could be. - * @throws UnsupportedOperationException + * @throws UnsupportedOperationException because it is not supported */ @Override public SORTED_MAP KEY_VALUE_GENERIC_TYPE tailMap(KEY_TYPE fromKey) { throw new UnsupportedOperationException(); } diff --git a/src/builder/resources/speiger/assets/collections/templates/sets/AVLTreeSet.template b/src/builder/resources/speiger/assets/collections/templates/sets/AVLTreeSet.template index a375c455..49d5528d 100644 --- a/src/builder/resources/speiger/assets/collections/templates/sets/AVLTreeSet.template +++ b/src/builder/resources/speiger/assets/collections/templates/sets/AVLTreeSet.template @@ -964,6 +964,8 @@ public class AVL_TREE_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_TYPE public KEY_TYPE getDefaultMinValue() { return null; } #endif + @Override + public abstract BI_ITERATOR KEY_GENERIC_TYPE iterator(); boolean tooLow(KEY_TYPE key) { if (!fromStart) { diff --git a/src/builder/resources/speiger/assets/collections/templates/sets/ArraySet.template b/src/builder/resources/speiger/assets/collections/templates/sets/ArraySet.template index e078dd6c..6c02d61f 100644 --- a/src/builder/resources/speiger/assets/collections/templates/sets/ArraySet.template +++ b/src/builder/resources/speiger/assets/collections/templates/sets/ArraySet.template @@ -503,7 +503,7 @@ public class ARRAY_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_TYPE im * Unsupported for now. Implementation is buggy and does not support the Java Standard with these functions. * It is a Unsorted Sorted Set. Thats why the SubSet implementation will be disabled until a better solution is found. * To give a simple reason: LinkedHashSets are also not SortedSets even so they could be. - * @throws UnsupportedOperationException + * @throws UnsupportedOperationException because it is not supported */ @Override public SORTED_SET KEY_GENERIC_TYPE subSet(KEY_TYPE fromElement, KEY_TYPE toElement) { throw new UnsupportedOperationException(); } @@ -511,7 +511,7 @@ public class ARRAY_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_TYPE im * Unsupported for now. Implementation is buggy and does not support the Java Standard with these functions. * It is a Unsorted Sorted Set. Thats why the SubSet implementation will be disabled until a better solution is found. * To give a simple reason: LinkedHashSets are also not SortedSets even so they could be. - * @throws UnsupportedOperationException + * @throws UnsupportedOperationException because it is not supported */ @Override public SORTED_SET KEY_GENERIC_TYPE headSet(KEY_TYPE toElement) { throw new UnsupportedOperationException(); } @@ -519,7 +519,7 @@ public class ARRAY_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_TYPE im * Unsupported for now. Implementation is buggy and does not support the Java Standard with these functions. * It is a Unsorted Sorted Set. Thats why the SubSet implementation will be disabled until a better solution is found. * To give a simple reason: LinkedHashSets are also not SortedSets even so they could be. - * @throws UnsupportedOperationException + * @throws UnsupportedOperationException because it is not supported */ @Override public SORTED_SET KEY_GENERIC_TYPE tailSet(KEY_TYPE fromElement) { throw new UnsupportedOperationException(); } diff --git a/src/builder/resources/speiger/assets/collections/templates/sets/RBTreeSet.template b/src/builder/resources/speiger/assets/collections/templates/sets/RBTreeSet.template index b98e9300..88936dcb 100644 --- a/src/builder/resources/speiger/assets/collections/templates/sets/RBTreeSet.template +++ b/src/builder/resources/speiger/assets/collections/templates/sets/RBTreeSet.template @@ -1025,6 +1025,8 @@ public class RB_TREE_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_TYPE public KEY_TYPE getDefaultMinValue() { return null; } #endif + @Override + public abstract BI_ITERATOR KEY_GENERIC_TYPE iterator(); boolean tooLow(KEY_TYPE key) { if (!fromStart) {