Java utility classes and functions to simplify repetitive tasks