The generic handling for the interface needs to comply the PECS principles.That is,as a producer it needs to use extends key-word and as a consumer it needs to use super key-word. Obviously,interface Predicate is a consumer,interface Consumer is a consumer,the inputting param of interface Function is a consumer but the outputting param of interface Function is a producer.