Write TextRules. The first input is a minimum length; the rest are words. Write a method
static List<String> transform(List<String> words, Predicate<String> keep, Function<String, String> change)
and use lambdas and method references of these types: Predicate<String> (long enough; starts with an upper-case letter), Function<String, String> (String::toUpperCase), Function<String, Integer> (String::length), UnaryOperator<String> (add !), BinaryOperator<String> (the longer of two words, the first on a tie) and Supplier<String> ((none)). Combine them with and, or, negate and andThen.
For the input
4 Java is Fun and Powerful today
the program prints
long enough: [Java, Powerful, today]
long AND capitalised: [Java, Powerful]
NOT long enough: [is, Fun, and]
short OR capitalised, shouted: [JAVA!, IS!, FUN!, AND!, POWERFUL!]
first word: Java has 4 letters
longest word: Powerful