Class CollectionStore

  • All Implemented Interfaces:
    Iterable, Store

    public class CollectionStore
    extends java.lang.Object
    implements Store, Iterable
    A simple collection backed store.
    • Constructor Summary

      Constructors 
      Constructor Description
      CollectionStore​(java.util.Collection collection)
      Basic constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Collection getMatches​(Selector selector)
      Return the matches in the collection for the passed in selector.
      java.util.Iterator iterator()
      Support method for Iterable where available.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CollectionStore

        public CollectionStore​(java.util.Collection collection)
        Basic constructor.
        Parameters:
        collection - - initial contents for the store, this is copied.
    • Method Detail

      • getMatches

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

        public java.util.Iterator iterator()
        Support method for Iterable where available.
        Specified by:
        iterator in interface Iterable
        Returns:
        an Iterator.