void () { TripleFunction<CharSequence, CharSequence, Boolean, Boolean> assertPrecedence = (lesser, greater, ignoreCase) -> { assertTrue(StringUtil.compare(lesser, greater, ignoreCase) < 0); assertTrue(StringUtil.compare(greater, lesser, ignoreCase) > 0); return true; }; TripleFunction<CharSequence, CharSequence, Boolean, Boolean> assertEquality = (lesser, greater, ignoreCase) -> { assertEquals(0, StringUtil.compare(lesser, greater, ignoreCase)); assertEquals(0, StringUtil.compare(greater, lesser, ignoreCase)); return true; }; assertPrecedence.fun("A", "b", true); assertPrecedence.fun("a", "aa", true); assertPrecedence.fun("abb", "abC", true); assertPrecedence.fun("A", "a", false); assertPrecedence.fun("Aa", "a", false); assertPrecedence.fun("a", "aa", false); assertPrecedence.fun("-", "A", false); assertEquality.fun("a", "A", true); assertEquality.fun("aa12b", "Aa12B", true); assertEquality.fun("aa12b", "aa12b", false); }