Top Description Fields Constructors Methods
org.bouncycastle.util

public Class CollectionStore<T>

extends Object
implements Store<T>, Iterable<T>
Class Inheritance
All Implemented Interfaces
org.bouncycastle.util.Iterable, java.lang.Iterable, org.bouncycastle.util.Store
Imports
java.util.ArrayList, .Collection, .Iterator, .List

A simple collection backed store.

Field Summary

Modifier and TypeField and Description
private Collection<T>

Constructor Summary

AccessConstructor and Description
public
CollectionStore(Collection<T>
- initial contents for the store, this is copied.
collection
)

Basic constructor.

Method Summary

Modifier and TypeMethod and Description
public Collection<T>

Returns:

a possibly empty collection of matching objects.
getMatches
(Selector<T>
the selector to match against.
selector
)

Implements org.bouncycastle.util.Store.getMatches.

Return the matches in the collection for the passed in selector.
public Iterator<T>
iterator()

Implements org.bouncycastle.util.Iterable.iterator.

Returns an iterator over a set of elements of type T.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_localback to summary
private Collection<T> _local

Constructor Detail

CollectionStoreback to summary
public CollectionStore(Collection<T> collection)

Basic constructor.

Parameters
collection:Collection<T>

- initial contents for the store, this is copied.

Method Detail

getMatchesback to summary
public Collection<T> getMatches(Selector<T> selector)

Implements org.bouncycastle.util.Store.getMatches.

Return the matches in the collection for the passed in selector.

Parameters
selector:Selector<T>

the selector to match against.

Returns:Collection<T>

a possibly empty collection of matching objects.

iteratorback to summary
public Iterator<T> iterator()

Implements org.bouncycastle.util.Iterable.iterator.

Doc from org.bouncycastle.util.Iterable.iterator.

Returns an iterator over a set of elements of type T.

Returns:Iterator<T>

an Iterator.