Skip to content

Latest commit

 

History

History
100 lines (75 loc) · 3.53 KB

File metadata and controls

100 lines (75 loc) · 3.53 KB

Features

Contents

toArray

see ArrayUtils.toArray

Queryable and Extendable

see Query a group of map-reduce functions based on the linq (sql) syntax.

Functions

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);

snippet source | anchor

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

Actions

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);

snippet source | anchor

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

Actions.doNothing()

Action0 thru Action9 all have an implementation of the null object pattern for your convenience.

SimpleLogger.logToNothing()

see SimpleLogger.logToNothing()

NullLogger

Null Object Pattern for java.lang.Appendable

ArrayUtils.addToArray()

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);

snippet source | anchor

will result in a new copy of the array with the added items

Integer[] resulting = {1, 2, 3, 4, 5, 6};

snippet source | anchor

Back to User Guide