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:
+59
@@ -0,0 +1,59 @@
|
||||
package speiger.src.collections.PACKAGE.functions;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.function.Consumer;
|
||||
/**
|
||||
* Type-Specific Consumer interface that reduces (un)boxing and allows to merge other consumer types into this interface
|
||||
*/
|
||||
@FunctionalInterface
|
||||
#if JDK_TYPE && !TYPE_BOOLEAN
|
||||
public interface CONSUMER extends Consumer<CLASS_TYPE>, JAVA_CONSUMER
|
||||
#else
|
||||
public interface CONSUMER extends Consumer<CLASS_TYPE>
|
||||
#endif
|
||||
{
|
||||
/**
|
||||
* Type-Specific function to reduce (un)boxing.
|
||||
* Performs this operation on the given argument.
|
||||
*
|
||||
* @param t the input argument
|
||||
*/
|
||||
void accept(KEY_TYPE t);
|
||||
|
||||
public default CONSUMER andThen(CONSUMER after) {
|
||||
Objects.requireNonNull(after);
|
||||
return T -> {accept(T); after.accept(T);};
|
||||
}
|
||||
|
||||
/** {@inheritDoc}
|
||||
* <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 function.
|
||||
* @deprecated Please use the corresponding type-specific function instead.
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
default CONSUMER andThen(Consumer<? super CLASS_TYPE> after) {
|
||||
Objects.requireNonNull(after);
|
||||
return T -> {accept(T); after.accept(KEY_TO_OBJ(T));};
|
||||
}
|
||||
#if JDK_TYPE && PRIMITIVES
|
||||
|
||||
/** {@inheritDoc}
|
||||
* <p>This default implementation delegates to the corresponding type-specific function.
|
||||
* @deprecated Please use the corresponding type-specific function instead.
|
||||
*/
|
||||
@Override
|
||||
@Deprecated
|
||||
default CONSUMER andThen(JAVA_CONSUMER after) {
|
||||
Objects.requireNonNull(after);
|
||||
return T -> {accept(T); after.accept(T);};
|
||||
}
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user