New Fixes

- Fixed: ObjectLists Crashed when a null was provided as a Comparator.
(Unless the List was Initialized with the ClassType)
- Fixed: LinkedLists didn't implement add(Object)
- Fixed: Object Collections did have the JavaCollections deprecated as
the Constructor. This should only be deprecated for Primitives
- Added: Tests with 5k Random names for Object sorting.
- Changed: Object Arrays no longer require a Comparable[] it just
assumes now that the elements in the Array are Comparable
This commit is contained in:
2021-09-02 13:38:25 +02:00
parent aa1e7da38c
commit 117d0f36e6
16 changed files with 5204 additions and 57 deletions
@@ -147,7 +147,7 @@ public class CUSTOM_HASH_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_T
* @param strategy the strategy that allows hash control.
* @throws NullPointerException if Strategy is null
*/
@Deprecated
@Primitive
public CUSTOM_HASH_SET(Collection<? extends CLASS_TYPE> collection, STRATEGY KEY_SUPER_GENERIC_TYPE strategy) {
this(collection, HashUtil.DEFAULT_LOAD_FACTOR, strategy);
}
@@ -160,7 +160,7 @@ public class CUSTOM_HASH_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_T
* @throws NullPointerException if Strategy is null
* @throws IllegalStateException if the loadfactor is either below/equal to 0 or above/equal to 1
*/
@Deprecated
@Primitive
public CUSTOM_HASH_SET(Collection<? extends CLASS_TYPE> collection, float loadFactor, STRATEGY KEY_SUPER_GENERIC_TYPE strategy) {
this(collection.size(), loadFactor, strategy);
addAll(collection);
@@ -272,7 +272,7 @@ public class CUSTOM_HASH_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_T
}
@Override
@Deprecated
@Primitive
public boolean addAll(Collection<? extends CLASS_TYPE> c) {
if(loadFactor <= 0.5F) ensureCapacity(c.size());
else ensureCapacity(c.size() + size());