public <T extends Predicate> Stream<T> getAllPredicates(Variable var, Class<T> type) {
        return Stream.concat(
                getPredicates(type),
                getInnerPredicates(type)
        ).filter(p -> p.getVarName().equals(var));
    }
public < T extends Predicate > Stream < T > getAllPredicates ( Variable var , Class < T > type ) { return Stream . concat ( getPredicates ( type ) , getInnerPredicates ( type ) ) . filter ( p -> p . getVarName ( ) . equals ( var ) ) ; }
@param var variable of interest
@param type the class of {@link Predicate} to return
@param <T>  the type of {@link Predicate} to return
@return stream of all predicates (public and inner) relevant to this atom and variable