if ((namespaceURI.equals(item.getNamespaceURI())) || (item.getNamespaceURI() == null)) { results.add(item);
if ((namespaceURI.equals(item.getNamespaceURI())) || (item.getNamespaceURI() == null)) { results.add(item);
/** * Return a List of Rule instances for the specified pattern that also * match the specified namespace URI (if any). If there are no such * rules, return <code>null</code>. * * @param namespaceURI Namespace URI to match, or <code>null</code> to * select matching rules regardless of namespace URI * @param pattern Pattern to be matched */ protected List<Rule> lookup(String namespaceURI, String pattern) { // Optimize when no namespace URI is specified List<Rule> list = this.cache.get(pattern); if (list == null) { return (null); } if ((namespaceURI == null) || (namespaceURI.length() == 0)) { return (list); } // Select only Rules that match on the specified namespace URI ArrayList<Rule> results = new ArrayList<Rule>(); Iterator<Rule> items = list.iterator(); while (items.hasNext()) { Rule item = items.next(); if ((namespaceURI.equals(item.getNamespaceURI())) || (item.getNamespaceURI() == null)) { results.add(item); } } return (results); }
/** * Return a List of Rule instances for the specified pattern that also * match the specified namespace URI (if any). If there are no such * rules, return <code>null</code>. * * @param namespaceURI Namespace URI to match, or <code>null</code> to * select matching rules regardless of namespace URI * @param pattern Pattern to be matched */ protected List<Rule> lookup(String namespaceURI, String pattern) { // Optimize when no namespace URI is specified List<Rule> list = this.cache.get(pattern); if (list == null) { return (null); } if ((namespaceURI == null) || (namespaceURI.length() == 0)) { return (list); } // Select only Rules that match on the specified namespace URI ArrayList<Rule> results = new ArrayList<Rule>(); Iterator<Rule> items = list.iterator(); while (items.hasNext()) { Rule item = items.next(); if ((namespaceURI.equals(item.getNamespaceURI())) || (item.getNamespaceURI() == null)) { results.add(item); } } return (results); }
/** * Return a List of Rule instances for the specified pattern that also * match the specified namespace URI (if any). If there are no such * rules, return <code>null</code>. * * @param namespaceURI Namespace URI to match, or <code>null</code> to * select matching rules regardless of namespace URI * @param pattern Pattern to be matched */ protected List<Rule> lookup(String namespaceURI, String pattern) { // Optimize when no namespace URI is specified List<Rule> list = this.cache.get(pattern); if (list == null) { return (null); } if ((namespaceURI == null) || (namespaceURI.length() == 0)) { return (list); } // Select only Rules that match on the specified namespace URI ArrayList<Rule> results = new ArrayList<>(); Iterator<Rule> items = list.iterator(); while (items.hasNext()) { Rule item = items.next(); if ((namespaceURI.equals(item.getNamespaceURI())) || (item.getNamespaceURI() == null)) { results.add(item); } } return (results); }
/** * Return a List of Rule instances for the specified pattern that also * match the specified namespace URI (if any). If there are no such * rules, return <code>null</code>. * * @param namespaceURI Namespace URI to match, or <code>null</code> to * select matching rules regardless of namespace URI * @param pattern Pattern to be matched */ protected List<Rule> lookup(String namespaceURI, String pattern) { // Optimize when no namespace URI is specified List<Rule> list = this.cache.get(pattern); if (list == null) { return (null); } if ((namespaceURI == null) || (namespaceURI.length() == 0)) { return (list); } // Select only Rules that match on the specified namespace URI ArrayList<Rule> results = new ArrayList<Rule>(); Iterator<Rule> items = list.iterator(); while (items.hasNext()) { Rule item = items.next(); if ((namespaceURI.equals(item.getNamespaceURI())) || (item.getNamespaceURI() == null)) { results.add(item); } } return (results); }
/** * Return a List of Rule instances for the specified pattern that also * match the specified namespace URI (if any). If there are no such * rules, return <code>null</code>. * * @param namespaceURI Namespace URI to match, or <code>null</code> to * select matching rules regardless of namespace URI * @param pattern Pattern to be matched */ protected List<Rule> lookup(String namespaceURI, String pattern) { // Optimize when no namespace URI is specified List<Rule> list = this.cache.get(pattern); if (list == null) { return (null); } if ((namespaceURI == null) || (namespaceURI.length() == 0)) { return (list); } // Select only Rules that match on the specified namespace URI ArrayList<Rule> results = new ArrayList<Rule>(); Iterator<Rule> items = list.iterator(); while (items.hasNext()) { Rule item = items.next(); if ((namespaceURI.equals(item.getNamespaceURI())) || (item.getNamespaceURI() == null)) { results.add(item); } } return (results); }
/** * Return a List of Rule instances for the specified pattern that also * match the specified namespace URI (if any). If there are no such * rules, return <code>null</code>. * * @param namespaceURI Namespace URI to match, or <code>null</code> to * select matching rules regardless of namespace URI * @param pattern Pattern to be matched */ protected List lookup(String namespaceURI, String pattern) { // Optimize when no namespace URI is specified List list = (List) this.cache.get(pattern); if (list == null) { return (null); } if ((namespaceURI == null) || (namespaceURI.length() == 0)) { return (list); } // Select only Rules that match on the specified namespace URI ArrayList results = new ArrayList(); Iterator items = list.iterator(); while (items.hasNext()) { Rule item = (Rule) items.next(); if ((namespaceURI.equals(item.getNamespaceURI())) || (item.getNamespaceURI() == null)) { results.add(item); } } return (results); }