public static < T > Optional < T > getNullableAndFilteredOptional ( T target , Predicate < T > predicate ) { return Optional . ofNullable ( target ) . filter ( predicate ) ; }
Gets nullable and filtered optional .