java.lang.Object
xyz.ronella.trivial.functional.NoOperation
A do nothing implementation of some functional interfaces.
- Since:
- 2.2.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T1,T2> BiConsumer<T1, T2> An implementation of BiConsumer that does nothing.static <T1,T2, R> BiFunction<T1, T2, R> An implementation of BiFunction that does nothing.static <T1,T2, R> BiFunction<T1, T2, R> biFunction(R output) An implementation of BiFunction that does nothing but produce default output.static <T1 extends R,T2, R>
BiFunction<T1,T2, R> An implementation of BiFunction that does nothing and just return argument 1.static <T1,T2 extends R, R>
BiFunction<T1,T2, R> An implementation of BiFunction that does nothing and just return argument 2.static <T1,T2> BiPredicate<T1, T2> biPredicate(Boolean output) An implementation of Predicate that does nothing but must have a specific boolean output.static <T> Consumer<T>consumer()An implementation of Consumer that does nothing.static <T,R> Function<T, R> function()An implementation of Function that does nothing.static <T,R> Function<T, R> function(R output) An implementation of Function that does nothing but produce default output.static <T extends R,R>
Function<T,R> An implementation of Function that does nothing and just return what passed.static <T> Predicate<T>An implementation of Predicate that does nothing but must have a specific boolean output.static Sinksink()An implementation of Sink that does nothing.static <T> Supplier<T>supplier()An implementation of Supplier that does nothing.
-
Method Details
-
consumer
An implementation of Consumer that does nothing.- Type Parameters:
T- The type of the argument of the consumer.- Returns:
- A do nothing implementation of Consumer.
-
biConsumer
An implementation of BiConsumer that does nothing.- Type Parameters:
T1- The type of the first argument of the BiConsumer.T2- The type of the second argument of the BiConsumer.- Returns:
- A do nothing implementation of BiConsumer.
-
sink
An implementation of Sink that does nothing.- Returns:
- A do nothing implementation of Sink.
-
supplier
An implementation of Supplier that does nothing.- Type Parameters:
T- The type of output that the supplier will generate.- Returns:
- Always return null.
-
predicate
An implementation of Predicate that does nothing but must have a specific boolean output.- Type Parameters:
T- The type of argument that the predicate will work on.- Parameters:
output- The desired output of the do nothing.- Returns:
- The value of the output parameter.
-
biPredicate
An implementation of Predicate that does nothing but must have a specific boolean output.- Type Parameters:
T1- The type of first argument that the predicate will work on.T2- The type of second argument that the predicate will work on.- Parameters:
output- The desired output of the do nothing.- Returns:
- The value of the output parameter.
-
function
An implementation of Function that does nothing.- Type Parameters:
T- The type of the argument to work on.R- The return type.- Returns:
- Always return null.
-
function
An implementation of Function that does nothing but produce default output.- Type Parameters:
T- The type of the argument to work on.R- The return type.- Parameters:
output- The desired output of type R.- Returns:
- The value of the output parameter.
- Since:
- 2.11.0
-
functionPassThru
An implementation of Function that does nothing and just return what passed.- Type Parameters:
T- The type of the argument of instance of R to work on.R- The return type.- Returns:
- The value of the output parameter.
- Since:
- 2.11.0
-
biFunction
An implementation of BiFunction that does nothing.- Type Parameters:
T1- The type of the first argument to work on.T2- The type of the second argument to work on.R- The return type.- Returns:
- Always return null.
-
biFunction
An implementation of BiFunction that does nothing but produce default output.- Type Parameters:
T1- The type of the first argument to work on.T2- The type of the second argument to work on.R- The return type.*- Parameters:
output- The desired output of type R.- Returns:
- The value of the output parameter.
- Since:
- 2.11.0
-
biFunctionArg1PassThru
An implementation of BiFunction that does nothing and just return argument 1.- Type Parameters:
T1- The type of the first argument of instance of R to work on.T2- The type of the second argument to work on.R- The return type.*- Returns:
- The value of the output parameter.
- Since:
- 2.11.0
-
biFunctionArg2PassThru
An implementation of BiFunction that does nothing and just return argument 2.- Type Parameters:
T1- The type of the first argument to work on.T2- The type of the second argument of instance of R to work on.R- The return type.*- Returns:
- The value of the output parameter.
- Since:
- 2.11.0
-