Package org.bouncycastle.cms
Class RecipientInformationStore
- java.lang.Object
-
- org.bouncycastle.cms.RecipientInformationStore
-
- All Implemented Interfaces:
java.lang.Iterable<RecipientInformation>,org.bouncycastle.util.Iterable<RecipientInformation>
public class RecipientInformationStore extends java.lang.Object implements org.bouncycastle.util.Iterable<RecipientInformation>
-
-
Constructor Summary
Constructors Constructor Description RecipientInformationStore(java.util.Collection<RecipientInformation> recipientInfos)RecipientInformationStore(RecipientInformation recipientInformation)Create a store containing a single RecipientInformation object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecipientInformationget(RecipientId selector)Return the first RecipientInformation object that matches the passed in selector.java.util.Collection<RecipientInformation>getRecipients()Return all recipients in the collectionjava.util.Collection<RecipientInformation>getRecipients(RecipientId selector)Return possible empty collection with recipients matching the passed in RecipientIdjava.util.Iterator<RecipientInformation>iterator()Support method for Iterable where available.intsize()Return the number of recipients in the collection.
-
-
-
Constructor Detail
-
RecipientInformationStore
public RecipientInformationStore(RecipientInformation recipientInformation)
Create a store containing a single RecipientInformation object.- Parameters:
recipientInformation- the signer information to contain.
-
RecipientInformationStore
public RecipientInformationStore(java.util.Collection<RecipientInformation> recipientInfos)
-
-
Method Detail
-
get
public RecipientInformation get(RecipientId selector)
Return the first RecipientInformation object that matches the passed in selector. Null if there are no matches.- Parameters:
selector- to identify a recipient- Returns:
- a single RecipientInformation object. Null if none matches.
-
size
public int size()
Return the number of recipients in the collection.- Returns:
- number of recipients identified.
-
getRecipients
public java.util.Collection<RecipientInformation> getRecipients()
Return all recipients in the collection- Returns:
- a collection of recipients.
-
getRecipients
public java.util.Collection<RecipientInformation> getRecipients(RecipientId selector)
Return possible empty collection with recipients matching the passed in RecipientId- Parameters:
selector- a recipient id to select against.- Returns:
- a collection of RecipientInformation objects.
-
iterator
public java.util.Iterator<RecipientInformation> iterator()
Support method for Iterable where available.- Specified by:
iteratorin interfacejava.lang.Iterable<RecipientInformation>- Specified by:
iteratorin interfaceorg.bouncycastle.util.Iterable<RecipientInformation>
-
-