Skip to content

mihxil/utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

313 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java.util extensions

Build Status Maven Central codecov javadoc

Functional extensions

Classes related to java.util.Function and extensions like Predicate, Consumer and Supplier.

  • TriFunction, QuadriFunction

  • TriConsumer

  • TriPredicate

  • Morphing methods like

    • TriFunction#ignoreArg[1-4](…​) morphs a TriFunction to a QuadriFunction

    • TriFunction#withArg[1-3](…​) morphs a TriFunction to a BiFunction.

  • Utilities for that in

    • Functions

    • Consumers

    • Predicates,

    • Suppliers

      Things like memoize (to memoize the value of a supplier), closeable (to make a Supplier AutoCloseable) and ignoreArg (to morph a Supplier to a Function that ignores the argument) are provided.

  • Consistent equals and hashCode, for the utility functions that produce functional implementations. E.g. the above mentioned ignoreArg* and withArg* are not simply implemented with lambda’s, but also with equals and hashcode based on the source functional class implementation.

Release history

Version date remarks

1.17

2026-03

For the 'Throwing-' functional interfaces, there are now also overridden verison of the 'withArgN' and 'ignoreArgN' morphing methods, that remain 'Throwing-' functional interfaces, and throw the same exception as the original functional interface.

1.12

2025-06-26

A.o, introduction of 'CloseableSupplier' and 'UnwrappableSupplier' interfaces,

1.11

2024-05-11

1.10

2023-12

1.0

2020-11-30

About

java.util

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages