Class CollectionStore<T>

java.lang.Object
org.bouncycastle.util.CollectionStore<T>
All Implemented Interfaces:
Iterable<T>, Iterable<T>, Store<T>

public class CollectionStore<T> extends Object implements Store<T>, Iterable<T>
A simple collection backed store.
  • Constructor Details

    • CollectionStore

      public CollectionStore(Collection<T> collection)
      Basic constructor.
      Parameters:
      collection - - initial contents for the store, this is copied.
  • Method Details

    • getMatches

      public Collection<T> getMatches(Selector<T> selector)
      Return the matches in the collection for the passed in selector.
      Specified by:
      getMatches in interface Store<T>
      Parameters:
      selector - the selector to match against.
      Returns:
      a possibly empty collection of matching objects.
    • iterator

      public Iterator<T> iterator()
      Description copied from interface: Iterable
      Returns an iterator over a set of elements of type T.
      Specified by:
      iterator in interface Iterable<T>
      Specified by:
      iterator in interface Iterable<T>
      Returns:
      an Iterator.