Function filter = String::trim; Function converter = Integer::parseInt; int result = filter.andThen(converter).apply(" 123 ");