Project is now buildable.

-Moved: Code generation is in its own sourceset.
-Fixed: Bugs that caused that the project isnt buildable.
-Changed: Made build.gradle to a standard.
This commit is contained in:
2021-01-29 11:41:48 +01:00
parent 0cb07398f9
commit aaee550ea9
57 changed files with 132 additions and 86 deletions
@@ -0,0 +1,31 @@
package speiger.src.collections.PACKAGE.utils;
import java.util.Objects;
import java.util.function.Consumer;
import speiger.src.collections.utils.IArray;
/**
* Type-Specific Helper class to get the underlying array of array implementations.
* @see speiger.src.collections.PACKAGE.lists.ARRAY_LIST
*/
public interface IARRAY KEY_GENERIC_TYPE extends IArray
{
/**
* Provides the Underlying Array in the Implementation
* @return underlying Array
* @throws ClassCastException if the return type does not match the underlying array. (Only for Object Implementations)
*/
public KEY_TYPE[] elements();
/**
* Provides the Underlying Array in the Implementation. This function exists purely because of Synchronization wrappers to help run Synchronized Code
* @param action the action that handles the array
* @throws NullPointerException if action is null
* @throws ClassCastException if the return type does not match the underlying array. (Only for Object Implementations)
*/
public default void elements(Consumer<KEY_TYPE[]> action) {
Objects.requireNonNull(action);
action.accept(elements());
}
}