/** * @param match_class * @param search_key * @return */ public PredicatePairs createPredicatePairsForParent( Class<? extends CatalogType> match_class, CatalogType parent_search_key) { PredicatePairs ret = new PredicatePairs(this.catalog_stmts); // We're looking for Pairs where one of the elements matches the search_key, // and the other element is of the same type of match_class for (CatalogPair e : this) { if (e.getFirst().getClass().equals(match_class) && e.getSecond().getParent().equals(parent_search_key)) { ret.add( CatalogPair.factory( e.getSecond(), e.getFirst(), e.getComparisonExp(), e.getQueryTypes())); } else if (e.getSecond().getClass().equals(match_class) && e.getFirst().getParent().equals(parent_search_key)) { ret.add(e); } } // FOR return (ret); }