Added missing doc and made it a bit more consistend
This commit is contained in:
+14
-2
@@ -1,6 +1,7 @@
|
||||
package speiger.src.collections.PACKAGE.functions;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Type-Specific Class for Comparator to reduce (un)boxing
|
||||
@@ -14,12 +15,23 @@ public interface COMPARATOR extends Comparator<CLASS_TYPE>
|
||||
int compare(KEY_TYPE o1, KEY_TYPE o2);
|
||||
|
||||
/** {@inheritDoc}
|
||||
* <p>This default implementation delegates to the corresponding type-specific method.
|
||||
* @deprecated Please use the corresponding type-specific method instead.
|
||||
* <p>This default implementation delegates to the corresponding type-specific function.
|
||||
* @deprecated Please use the corresponding type-specific function instead.
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
default int compare(CLASS_TYPE o1, CLASS_TYPE o2) {
|
||||
return compare(OBJ_TO_KEY(o1), OBJ_TO_KEY(o2));
|
||||
}
|
||||
|
||||
/**
|
||||
* A Wrapper function to convert a Non-Type-Specific Comparator to a Type-Specific-Comparator
|
||||
* @param c comparator to convert
|
||||
* @return the wrapper of the comparator
|
||||
* @throws NullPointerException if the comparator is null
|
||||
*/
|
||||
public static COMPARATOR of(Comparator<CLASS_TYPE> c) {
|
||||
Objects.requireNonNull(c);
|
||||
return (K, V) -> c.compare(KEY_TO_OBJ(K), KEY_TO_OBJ(V))
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ public interface CONSUMER extends Consumer<CLASS_TYPE>
|
||||
#endif
|
||||
{
|
||||
/**
|
||||
* Type-Specific method to reduce (un)boxing.
|
||||
* Type-Specific function to reduce (un)boxing.
|
||||
* Performs this operation on the given argument.
|
||||
*
|
||||
* @param t the input argument
|
||||
@@ -30,8 +30,8 @@ public interface CONSUMER extends Consumer<CLASS_TYPE>
|
||||
|
||||
#if !JDK_CONSUMER
|
||||
/** {@inheritDoc}
|
||||
* <p>This default implementation delegates to the corresponding type-specific method.
|
||||
* @deprecated Please use the corresponding type-specific method instead.
|
||||
* <p>This default implementation delegates to the corresponding type-specific function.
|
||||
* @deprecated Please use the corresponding type-specific function instead.
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
@@ -44,16 +44,16 @@ public interface CONSUMER extends Consumer<CLASS_TYPE>
|
||||
}
|
||||
|
||||
/** {@inheritDoc}
|
||||
* <p>This default implementation delegates to the corresponding type-specific method.
|
||||
* @deprecated Please use the corresponding type-specific method instead.
|
||||
* <p>This default implementation delegates to the corresponding type-specific function.
|
||||
* @deprecated Please use the corresponding type-specific function instead.
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
default void accept(CLASS_TYPE t) { accept(OBJ_TO_KEY(t)); }
|
||||
|
||||
/** {@inheritDoc}
|
||||
* <p>This default implementation delegates to the corresponding type-specific method.
|
||||
* @deprecated Please use the corresponding type-specific method instead.
|
||||
* <p>This default implementation delegates to the corresponding type-specific function.
|
||||
* @deprecated Please use the corresponding type-specific function instead.
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
@@ -64,8 +64,8 @@ public interface CONSUMER extends Consumer<CLASS_TYPE>
|
||||
|
||||
#if PRIMITIVES
|
||||
/** {@inheritDoc}
|
||||
* <p>This default implementation delegates to the corresponding type-specific method.
|
||||
* @deprecated Please use the corresponding type-specific method instead.
|
||||
* <p>This default implementation delegates to the corresponding type-specific function.
|
||||
* @deprecated Please use the corresponding type-specific function instead.
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
|
||||
Reference in New Issue
Block a user