Commit Graph

175 Commits

Author SHA1 Message Date
Speiger d44ad2d42e 99% of the Set Module done.
The 1% is the Distinct Iterator that relies on a Set implementation.
So I have to make a dedicated set implementation.
2022-12-06 04:57:43 +01:00
Speiger 2ed090e989 Fixed a few bugs and Started the Set compilation. 2022-12-06 04:09:40 +01:00
Speiger dafb162797 Fixed a small bug where generic types can not be disabled. 2022-12-06 03:21:48 +01:00
Speiger 57280b8285 Map Generation can now be turned off. 2022-12-06 03:05:58 +01:00
Speiger c9fc963670 Few changes.
-Removed: BooleanSet classes are gone. (Unused anyways)
-Removed: Boolean2xMaps are also now gone. (Unused Anyways)
-Added: GlobalFlags that are shared across packages.
2022-12-05 07:10:53 +01:00
Speiger cc87cae145 Implemented Lists can now be Disabled
Each List implementation can be now turned off.
Or all Lists can be turned off.
ListIterator can't be turned of since it is a IndexBasedIterator and not
a List and a few implementation use them.
2022-12-05 00:01:53 +01:00
Speiger f53d61a5bc Fixed bug in the module generator config. 2022-12-04 08:00:31 +01:00
Speiger b29874189c Finishing Framework and making Async Module Optional. 2022-12-04 07:56:04 +01:00
Speiger 6722f399db Implemented Module Configuration 2022-12-02 22:36:34 +01:00
Speiger 8e39acef45 Finished adding the modules and implemented sorting algorythm.
That this works is crazy...
2022-11-29 14:33:16 +01:00
Speiger b065ebe9ba Start of the Modularization
-Added: Base code to modularize the project.
-Added: Javas Base Module.
2022-11-27 13:16:21 +01:00
Speiger 25a7cd060a The beginning of modulizing Primitive Collections.
This will be a small rewrite of the "Builder".
Why this is done?
Basically this library is really big and having the Option to turn of
modules that you don't need is really important.

And right now enabling/disabling modules is really difficult since
everything is merged together.

So the first goal is to modularized where everything can be turned on or
of as wished.
2022-11-21 06:45:07 +01:00
Speiger 99e9afe7b1 Started working on the next patch.
- Added: ISizeProvider interface (Optimization Helper)
- Added: ISizeProvider into most Iterable implementations
(Distinct/Filter/FlatMap/ArrayFlatMap don't support it, for obvious
reasons)
- Added: ToArray function into Iterable which uses ISizeProvider to
reduce overhead of duplicating arrays.
- Fixed: putIfAbsent now replaces defaultValues
2022-11-20 08:56:23 +01:00
Speiger 03b23f0e3c Added New Iterable Feature
-Added: Repeating iterable/iterator/async feature which allows to repeate collections a desired amount of times.
-Added: Tests for it.
2022-07-16 05:00:22 +02:00
Speiger fb7c417394 Refactor of the Project on Github.
-Added: Better System to decide what code should be generated.
-Added: Unit Tests are now included in the main branch.
-Added: Automatic System to test the main branch and ensure that tests work.
-Added: Pull Requests now run tests too.
2022-06-14 08:55:40 +02:00
Speiger ddc58ee221 Version 0.7.0 Release
- Added: Coverage Badge
- Updated: Changelog.
- Changed: Changelog now has info how to obtain the sourcecode.
- Added: Over 11 Million Unit Tests to this library to ensure quality.
- Added: ArrayList size constructor now throws IllegalStateException if
the size parameter is negative
- Added: EnumMap specialized forEach implementation.
- Added: AbstractMap.remove now delegates to its primitive counterpart.
- Added: ConcurrentHashMap now implements ITrimmable
- Refactor: Removed a lot of disabled code from ArraySet.
- Removed: LinkedList.addAll(index, List) now delegates to
LinkedList.addAll(index, Collection) due to no special optimization
required.
- Fixed: AbstractList.SubList.get/set/swapRemove didn't calculate their
List index Properly
- Fixed: AbstractList.SubList chains now properly if you create SubLists
within SubLists.
- Fixed: AbstractList.Iterator.add now respects
Immutable/UnmodifiableLists.
- Fixed: AbstractList.Iterator.skip/back now keep track of the last
returned value for remove function to work properly.
- Fixed: CopyOnWriteArrayList.extract/removeElements(int, int) does now
proper range checks and remove elements properly.
- Fixed: CopyOnWriteArrayList.SubList now works properly. (Reimplemented
entirely)
- Fixed: CopyOnWriteArrayList.Iterator.previous() was returning the
wrong values.
- Fixed: CopyOnWriteArrayList.Iterator.skip now skips the right amount
of elements and stops where it should.
- Fixed: LinkedList.first/last/dequeue/dequeueLast now throws
NoSuchElementException when empty instead of IllegalStateException.
- Fixed: LinkedList had an edge case where the entire reverse iterator
would break if the wrong element was removed.
- Fixed: LinkedList.extractElement now returns the correct values.
- Fixed: AbstractMap.entrySet().remove(Object) now returns true if
defaultReturnValue elements were removed.
- Fixed: ConcurrentHashMap.remove(Object, Object) checks if the type
matches before comparing against null Values.
- Fixed: LinkedHashMap.clearAndTrim() was checking the wrong value for
determining the full reset or clearing of a Map.
- Fixed: HashMap.trim/clearToTrim() was using the wrong value to
determin if something should be done.
- Fixed: HashMap now compares empty values (0) against nullKeys when
Object Variants of the type are used.
- Fixed: ImmutableMap now compares empty values (0) against nullKeys
when Object Variants of the type are used.
- Fixed: ArrayMap.iterator(key) now throws NoSuchElementException when
the element wasn't found.
- Fixed: Linked/EnumMap array constructor was creating the wrong size
values array.
- Fixed: LinkedEnumMap.getAndMoveToFirst/Last was moving elements even
if the element wasn't present.
- Fixed: AVL/RBTreeMap.getFirst/LastKey was not throwing a
NoSuchElementException if the map was empty.
- Fixed: Map.Builder wasn't throwing a IllegalStateException when
creating a negative size builder.
- Fixed: AVL/RBTreeSet.DecendingSet.subSet(from, fromInclusive, to,
toInclusive) was creating a corrupt asending subset.
- Fixed: ArraySet throws now a IllegalStateException when trying to
create it with a negative size.
- Fixed: ArraySet.addMoveToLast(key) was crashing when a key was already
present.
- Fixed: Immutable/LinkedHashSet now keep track of their iteration index
properly.
- Fixed: LinkedHashSet.moveToFirst/Last(key) would crash if the Set was
empty.
- Fixed: LinkedHashSet.clearAndTrim() was checking the wrong value for
determining the full reset or clearing of a Map.
- Fixed: HashSet.trim/clearToTrim() was using the wrong value to
determin if something should be done.
2022-06-12 14:31:45 +02:00
Speiger 8b5e5a75c1 Fixing bugs found when implementing Bidirectional Iterator unit tests.
-Fixed: AbstractList/ImmutableList/ArraySet/ArrayMap skip/back implementation was causing crashes and didn't update the last returned value.
-Fixed: ArraySet/ArrayMap previous was not subtracting before returning value.
-Fixed: BidirectionalIterator back was calling the object variant instead of the TypeSpecific Variant.
-Fixed: TreeSets/Maps Iterator now fully supports backwards Iterating.
-Added: Specialized skip/back function to improve speed in ImmutableHashSet/LinkedHashSet/CustomLinkedHashSet
2022-06-04 21:05:31 +02:00
Speiger c1862e6b05 Fixed a Few bugs with wrappers.
-Fixed: Maps.EmptyMap getOrDefault wasn't returning the default value.
-Fixed: Maps.UnmodifiableMap wasn't respecting the change of the DefaultReturnValue. (it has its own version of it so it doesn't break the rule of it, it wasn't returning the expected value.
-Added: A bunch of Methods for Unmodifiable/Empty maps that should fail right out but would still make it past a certain point. (Compute/Merge/Supply/etc)
2022-06-03 14:38:56 +02:00
Speiger c2c2780967 MapFixes found with unit tests.
-Fixed: CollectionWrapper.equals wasn't accounting for self.
-Fixed: MapWrapper.get didn't account for that it was a wrapper.
-Fixed: UnmodifiableMapWrapper was linking to synchronized maps due to a unknown reason.
-Added: UnmodifiableMapWrapper now has a lot more functions it right out says unsupported instead of indirect ways.
2022-06-02 16:21:48 +02:00
Speiger 086d933a0d Small fixes
-Fixed: NavigableMap.keySet is now a NavigableSet instead of a sorted one.
-Started: Trying to fix wrappers.
2022-06-02 14:59:39 +02:00
Speiger 1e7da394a1 Fixed Bugs found with wrapper collections
-Fixed: AbstractCollection.Iterator was changing the pointer before validating if the element was added. (ImmutableLists)
-Fixed: EmptyCollections containsAll should return true if it is compared against a emptyCollection.
-Fixed: HashCode/Equals for the Lists/Sets implementations.
-Changed: Iterators.wrap(Array) allows now dynamic arrays.
2022-06-02 11:02:19 +02:00
Speiger 9eb220194f Small fixes.
-Fixed: SynchronizedList.addElements was calling itself.
-Fixed: UnmodifiableSet was missing implementations that were causing fails.
2022-06-02 00:47:05 +02:00
Speiger 569d4f5c86 Small Fix
-Fixed: HashSet/Map.reduce was using size to iterate instead of array.length
2022-05-31 19:05:54 +02:00
Speiger 27ad01657d More fixes from Unit tests.
-Fixed: ArrayList/LinkedList extractElements crashing when 0 or less elements are desired.
-Fixed: TreeMap pollFirst/LastKey should return the defaultMin/max value instead of a Empty value.
-Fixed: TreeMap keySet implementation was missing the class type implementations to pass keySet tests.
-Fixed: TreeMap.SubMap Iterator (primitive Keys) was crashing because a Null was set on to a primitive.
2022-05-27 16:35:41 +02:00
Speiger e7da7acc08 Started massive unit testing library these are the first fixes.
-Fixed: AbstractCollection.retainAll didn't push removed values through the consumer.
-Fixed: AbstractCollection.toArray wouldn't reset the last entry if the input array was larger then the elements in the collection.
-Fixed: SubList didn't check for ranges properly or didn't use parent list to validate changes.
-Fixed: ArrayList.addElements didn't check input array fully and used the wrong variable to move the elements around.
-Fixed: LinkedList.addElements(EmptyInput) would crash.
-Fixed: LinkedList.swapRemove didn't account for if the removed element was the prelast one.
-Fixed: LinkedList.removeElements would break the implementation if the list was almost empty and the middle element was removed.
-Fixed: LinkedHashSet.addAndMoveToFirst wouldn't move elements to the first place.
2022-05-22 15:13:29 +02:00
Speiger 72943cb22c Added AsyncBuilder for arrays 2022-05-17 18:10:07 +02:00
Speiger 068cc4a4f7 Fixed Bugs with Java Iterators not throwing the correct exception. 2022-05-17 10:45:05 +02:00
Speiger 31b34f5de1 Fixed a couple bugs.
-Fixed: TreeMap.subMap().entrySet().remove() wouldn't check primitives properly.
-Fixed: SortedMap.sub/tail/headMap were looping into themselves.
-Changed: LinkedList.addBulk variable definition was triggering a false positive.
2022-05-17 07:59:57 +02:00
Speiger 4bded1af80 Small Change to sorting
-Added: Array only sorting function return the inputed array. This was done to allow for static final references to use the method in one go without having to make lambda wrappers. Cleaner code.
2022-04-30 22:41:11 +02:00
Speiger 5fa26bfbf3 New Stuff
-Fixed: Crash with FIFOQueues peek function when loops were applied.
-Fixed: FIFOQueues clean function was doing unessesary extra work.
-Added: Stream Overrides functions now support sorted.
-Updated: Changelog.
-Added: A couple more badges because why not.
2022-04-21 17:25:23 +02:00
Speiger 3d6cbf5ac1 Finishing touches for the 0.6.0 release. 2022-04-14 07:29:32 +02:00
Speiger fc5d43e14b Updated Changelog. 2022-04-14 06:06:35 +02:00
Speiger b3264748cd Added Author to module Info. 2022-04-14 05:47:19 +02:00
Speiger ede40f06d0 Small fixes.
-Fixed: Some imports.
-Fixed: containsValue for OpenHashMap was not checking nullEntry properly
2022-04-14 05:37:41 +02:00
Speiger e69c675f82 Fixed bug with linux & cleanup of the java version detector 2022-04-13 02:58:35 +02:00
Speiger 17c1c90957 Added Module-Info support 2022-04-13 02:54:03 +02:00
Speiger c6f2f71f6c Switching to a new lock to make read operations actually concurrent. 2022-04-13 02:00:52 +02:00
Speiger d2c7c151bc Implemented tests.
-Added: ConcurrentHashMap test suite
-Fixed: Bugs found in ConcurrentHashMaps with the iterator and clear function.
2022-04-12 08:08:17 +02:00
Speiger 4448eca787 Finishing ConcurrentHashMap implementation, next tests 2022-04-12 06:06:18 +02:00
Speiger 0350a77dff Finishing the ConcurrentMap implementation
This though isn't finishing the rest because the interface still needs
to be implemented.
-Added: Rest of the ConcurrentMap implementation
-Fixed: LinkedOpenHashMap Count method was returning prematurely.
2022-04-11 03:20:28 +02:00
Speiger 4f98c599df New Features.
-Added: ArrayList.of(CLASS, size) function that allows to preallocate
the size of the generic list.
-Updated: ListTests suppressors only suprres what they need to.
-Added: Start of the ConcurrentHashMap implementation (based on Guavas
implementation)

Note that the ConcurrentHashMap implementation is just started not
finished and still needs a lot of work, but the base code - any
subclasses is technically finished.
The implementation is also using linkedMaps to have faster iteration
performance.
2022-04-10 15:49:16 +02:00
Speiger 059da9be12 New Features
-Added: CopyOnWriteArrayList
-Added: UnitTests for CopyOnWriteArrayLists
2022-04-09 03:56:54 +02:00
Speiger 3cac3a997e And hopefully the last javaDoc fixes 2022-04-08 00:24:37 +02:00
Speiger 3ffb001c73 More fixes
-Fixed: More javadoc fixes
-Fixed: BaseIntIterableTest no longer uses a deprecated function
2022-04-08 00:13:51 +02:00
Speiger 2810a6f952 Small fixes
-Fixed: JavaDoc
-Changed: callback is now called onCompletion
2022-04-08 00:00:45 +02:00
Speiger ca38583f96 Fixed Java11 Incompat 2022-04-07 00:14:09 +02:00
Speiger 6f31fc5abb New Features
- Added: addOrGet for sets.
- Added: Async API which allows to easily execute Iterables/Collections
offthread without the complexity.
2022-04-07 00:04:52 +02:00
Speiger b46a739008 Finishing Build Action 2021-12-27 20:28:45 +01:00
Speiger dbfae33074 Fixed Bug with FIFOQueue performance 2021-12-26 00:08:19 +01:00
Speiger ead34009c6 Added pourAsList and pourAsSet 2021-12-25 20:27:33 +01:00