Adding more JavaDoc (fixing roughly 8k javadoc errors)

-Added: JavaDocs to Map classes/constructors
-Added: JavaDocs to the Maps Class
This commit is contained in:
2021-04-25 21:37:22 +02:00
parent 2ca14f4d4f
commit 0017697b07
22 changed files with 877 additions and 35 deletions
@@ -38,10 +38,14 @@ public interface COMPARATOR extends Comparator<CLASS_TYPE>
return (K, V) -> c.compare(KEY_TO_OBJ(K), KEY_TO_OBJ(V));
}
@Override
public default COMPARATOR reversed() {
return new Reversed(this);
}
/**
* A Type Specific Reversed Comparator to reduce boxing/unboxing
*/
static class Reversed implements COMPARATOR
{
COMPARATOR original;
@@ -20,6 +20,12 @@ public interface CONSUMER extends Consumer<CLASS_TYPE>
*/
void accept(KEY_TYPE t);
/**
* Type Specific sequencing method to reduce boxing/unboxing.
* @param after a operation that should be performed afterwards
* @return a sequenced consumer that does 2 operations
* @throws NullPointerException if after is null
*/
public default CONSUMER andThen(CONSUMER after) {
Objects.requireNonNull(after);
return T -> {accept(T); after.accept(T);};
@@ -3,10 +3,28 @@ package speiger.src.collections.PACKAGE.functions.consumer;
import java.util.Objects;
import java.util.function.BiConsumer;
/**
* A Type Specific BiConsumer class to reduce boxing/unboxing and that fills the gaps that java has.
* @Type(T)
* @ValueType(V)
*/
public interface BI_CONSUMER KEY_VALUE_GENERIC_TYPE extends BiConsumer<CLASS_TYPE, CLASS_VALUE_TYPE>
{
/**
* A Type Specific operation method to reduce boxing/unboxing
* Performs this operation on the given arguments.
*
* @param k the first input argument
* @param v the second input argument
*/
void accept(KEY_TYPE k, VALUE_TYPE v);
/**
* Type Specific sequencing method to reduce boxing/unboxing.
* @param after a operation that should be performed afterwards
* @return a sequenced biconsumer that does 2 operations
* @throws NullPointerException if after is null
*/
public default BI_CONSUMER KEY_VALUE_GENERIC_TYPE andThen(BI_CONSUMER KEY_VALUE_GENERIC_TYPE after) {
Objects.requireNonNull(after);
return (K, V) -> {accept(K, V); after.accept(K, V);};
@@ -2,6 +2,11 @@ package speiger.src.collections.PACKAGE.functions.function;
import java.util.function.BiFunction;
/**
* A Type Specific Unary Operator to support Compute/Merge functions with type specific methods to reduce boxing/unboxing
* @Type(T)
* @ValueType(V)
*/
#if !SAME_TYPE || TYPE_BOOLEAN || !JDK_TYPE
public interface UNARY_OPERATOR KEY_VALUE_GENERIC_TYPE extends BiFunction<CLASS_TYPE, CLASS_VALUE_TYPE, CLASS_VALUE_TYPE>
#else
@@ -17,6 +22,14 @@ public interface UNARY_OPERATOR KEY_VALUE_GENERIC_TYPE extends BiFunction<CLASS_
@Override
public default CLASS_VALUE_TYPE apply(CLASS_TYPE k, CLASS_VALUE_TYPE v) { return VALUE_TO_OBJ(APPLY_VALUE(OBJ_TO_KEY(k), OBJ_TO_VALUE(v))); }
#else
/**
* A Type Specifc apply method to reduce boxing/unboxing.
* Applies this function to the given arguments.
*
* @param k the first function argument
* @param v the second function argument
* @return the function result
*/
public VALUE_TYPE APPLY_VALUE(KEY_TYPE k, VALUE_TYPE v);
@Override