- toArray
- Queryable and Extendable
- Functions
- Actions
- Actions.doNothing()
- SimpleLogger.logToNothing()
- NullLogger
- ArrayUtils.addToArray()
see Query a group of map-reduce functions based on the linq (sql) syntax.
Function0 through Function9 are single method interfaces for use with lambdas where you take 0-9 parameters and return a result.
For Example Function3 has the single method :
public Out call(In1 a, In2 b, In3 c);
The first 3 have native java equivalents (that are hard to remember).
If it is preferred to use those, but can't remember their name, they are listed in the javadocs.
Function0 -> java.util.function.Supplier
Function1 -> java.util.function.Function
Function2 -> java.util.function.BiFunction
Action0 through Action9 are single method interfaces for use with lambdas where you take 0-9 parameters and all results are via side-effect (void return).
For Example Action3 has the single method:
public void call(In1 a, In2 b, In3 c);
The first 3 have native java equivalents (that are hard to remember).
If it is preferred to use those, but can't remember their name, they are listed in the javadocs.
Action0 -> java.lang.Runnable
Action1 -> java.util.function.Consumer
Action2 -> java.util.function.BiConsumer
Action0 thru Action9 all have an implementation of the null object pattern for your convenience.
see SimpleLogger.logToNothing()
Null Object Pattern for java.lang.Appendable
Sometimes you wish you could add to an array the same way you can add to a list.
Integer[] numbers = {1, 2, 3};
numbers = ArrayUtils.addToArray(numbers, 4, 5, 6);
will result in a new copy of the array with the added items
Integer[] resulting = {1, 2, 3, 4, 5, 6};