summaryrefslogtreecommitdiff
path: root/bcprov/src/main/java/org/bouncycastle/util/Store.java
blob: 0f55039ec4ca066554e2429b0f7d8d8a9b331786 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package org.bouncycastle.util;

import java.util.Collection;

/**
 * A generic interface describing a simple store of objects.
 *
 * @param <T> the object type stored.
 */
public interface Store<T>
{
    /**
     * Return a possibly empty collection of objects that match the criteria implemented
     * in the passed in Selector.
     *
     * @param selector the selector defining the match criteria.
     * @return a collection of matching objects, empty if none available.
     * @throws StoreException if there is a failure during matching.
     */
    Collection<T> getMatches(Selector<T> selector)
        throws StoreException;
}