Pull requests welcomed!
Please run any nontrivial contribution ideas by the project maintainer, hiljusti, before sending a PR.
Some code may need to be evil, and if so, should be marked with @Evil
.
This is an example of a neutral combination:
Function<A, B> + Function <B, C> = Function<A, C>
Assuming both functions are pure, it has a clear flow and nothing is hidden.
This, on the other hand, is an example of an evil combination:
Consumer<A> + Supplier<B> = Function<A, B>
There is no direct relation between the void return of the Consumer and the no-args invocation of the Supplier. This can usually be understood as a code smell. Something is being done in that Consumer (a network call, something in a thread, a mutating action) that may now be hidden from the end caller.
Evil functions or collections of functions can be a sign of either
- Evil code is being written, or
- Code is interacting with something evil
Because alphabetic ordering may be difficult to grok, the project follows the following ordering. Classes may be omitted when there is no benefit, or a different class also matches, and there's no benefit to specificity.
- Object
- boolean
- double
- int
- long
- Function
- BiFunction
- BooleanFunction (Z)
- BooleanToDoubleFunction (Z)
- BooleanToIntFunction (Z)
- BooleanToLongFunction (Z)
- DoubleFunction
- DoubleToIntFunction
- DoubleToLongFunction
- ToDoubleFunction
- ToDoubleBiFunction
- IntFunction
- IntToDoubleFunction
- IntToLongFunction
- ToIntFunction
- ToIntBiFunction
- LongFunction
- LongToDoubleFunction
- LongToIntFunction
- ToLongFunction
- ToLongBiFunction
- Predicate
- BiPredicate
- BooleanPredicate (Z)
- DoublePredicate
- IntPredicate
- LongPredicate
- Consumer
- BiConsumer
- BooleanConsumer (Z)
- DoubleConsumer
- ObjDoubleConsumer
- IntConsumer
- ObjIntConsumer
- LongConsumer
- ObjLongConsumer
- Supplier
- BooleanSupplier
- DoubleSupplier
- IntSupplier
- LongSupplier
- Operator (Z)
- UnaryOperator
- BinaryOperator
- DoubleUnaryOperator
- DoubleBinaryOperator
- IntUnaryOperator
- IntBinaryOperator
- LongUnaryOperator
- LongBinaryOperator
- TriFunction
- QuadFunction
- QuinFunction
- SexFunction
- SeptFunction
- OctFunction
- NonFunction
- DecFunction
- UndecFunction
- DodecFunction
Usage examples in tests are welcomed, unit tests are required.
Any PR must continue to compile and pass tests.
Publishing to Maven Central is currently handled by hiljusti.
The staging repository (prior to release to maven central) is at: https://s01.oss.sonatype.org