public static < T , C extends Collection < T > > void ifNotNullOrEmptyConsume ( C collection , Consumer < C > consumer ) { JMOptional . getOptional ( collection ) . ifPresent ( consumer ) ; }
If not null or empty consume .