/** * Return a collection of entries matching the passed in selector. * * @param selector the selector to validate entries against. * @return a possibly empty collection of matched entries. * @throws StoreException in case of an underlying issue. */ public Collection getMatches(Selector selector) throws StoreException { if (selector == null) { return entries.values(); } List results = new ArrayList(); for (Iterator it = entries.values().iterator(); it.hasNext();) { Object next = it.next(); if (selector.match(next)) { results.add(next); } } return Collections.unmodifiableList(results); }
if (selector.match(obj))
/** * Return the matches in the collection for the passed in selector. * * @param selector the selector to match against. * @return a possibly empty collection of matching objects. */ public Collection<T> getMatches(Selector<T> selector) { if (selector == null) { return new ArrayList<T>(_local); } else { List<T> col = new ArrayList<T>(); Iterator<T> iter = _local.iterator(); while (iter.hasNext()) { T obj = iter.next(); if (selector.match(obj)) { col.add(obj); } } return col; } }
/** * Return a collection of entries matching the passed in selector. * * @param selector the selector to validate entries against. * @return a possibly empty collection of matched entries. * @throws StoreException in case of an underlying issue. */ public Collection getMatches(Selector selector) throws StoreException { if (selector == null) { return entries.values(); } List results = new ArrayList(); for (Iterator it = entries.values().iterator(); it.hasNext();) { Object next = it.next(); if (selector.match(next)) { results.add(next); } } return Collections.unmodifiableList(results); }
&& !paramsPKIX.getTargetConstraints().match((X509Certificate) certs.get(0)))