14 | * At some point this class should disappear... 15 | * 16 | * @author Clement Escoffier 17 | */ 18 | @SuppressWarnings("unchecked") 19 | public class Casts { 20 | 21 | private Casts() { 22 | // Avoid direct instantiation. 23 | } 24 | 25 | public static Function cast(Function, ?> fun) { 26 | return (Function) fun; 27 | } 28 | 29 | public static Predicate cast(Predicate> p) { 30 | return (Predicate) p; 31 | } 32 | 33 | public static ProcessingStage cast(ProcessingStage, ?> p) { 34 | return (ProcessingStage) p; 35 | } 36 | 37 | public static Processor cast(Processor, ?> p) { 38 | return (Processor