Class CollectionStore<T>

    • Constructor Detail

      • CollectionStore

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

      • 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.