Class SecretKeyRingSelectionStrategy<O>
- java.lang.Object
-
- org.pgpainless.util.selection.keyring.SecretKeyRingSelectionStrategy<O>
-
- Type Parameters:
O- Type of identifier
- All Implemented Interfaces:
KeyRingSelectionStrategy<org.bouncycastle.openpgp.PGPSecretKeyRing,org.bouncycastle.openpgp.PGPSecretKeyRingCollection,O>
- Direct Known Subclasses:
ExactUserId.SecRingSelectionStrategy,Whitelist.SecRingSelectionStrategy,Wildcard.SecRingSelectionStrategy
public abstract class SecretKeyRingSelectionStrategy<O> extends java.lang.Object implements KeyRingSelectionStrategy<org.bouncycastle.openpgp.PGPSecretKeyRing,org.bouncycastle.openpgp.PGPSecretKeyRingCollection,O>
AbstractKeyRingSelectionStrategyforPGPSecretKeyRings.
-
-
Constructor Summary
Constructors Constructor Description SecretKeyRingSelectionStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<org.bouncycastle.openpgp.PGPSecretKeyRing>selectKeyRingsFromCollection(O identifier, org.bouncycastle.openpgp.PGPSecretKeyRingCollection keyRingCollection)Iterate of the givenMultiMap<O,org.bouncycastle.openpgp.PGPSecretKeyRing>selectKeyRingsFromCollections(MultiMap<O,org.bouncycastle.openpgp.PGPSecretKeyRingCollection> keyRingCollections)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pgpainless.util.selection.keyring.KeyRingSelectionStrategy
accept
-
-
-
-
Method Detail
-
selectKeyRingsFromCollection
public java.util.Set<org.bouncycastle.openpgp.PGPSecretKeyRing> selectKeyRingsFromCollection(O identifier, @Nonnull org.bouncycastle.openpgp.PGPSecretKeyRingCollection keyRingCollection)
Description copied from interface:KeyRingSelectionStrategyIterate of the givenkeyRingCollection
and return aSetof all acceptable keyRings in the collection, based on the givenidentifier
.- Specified by:
selectKeyRingsFromCollectionin interfaceKeyRingSelectionStrategy<org.bouncycastle.openpgp.PGPSecretKeyRing,org.bouncycastle.openpgp.PGPSecretKeyRingCollection,O>- Parameters:
identifier- identifierkeyRingCollection- collection- Returns:
- set of acceptable key rings
-
selectKeyRingsFromCollections
public MultiMap<O,org.bouncycastle.openpgp.PGPSecretKeyRing> selectKeyRingsFromCollections(@Nonnull MultiMap<O,org.bouncycastle.openpgp.PGPSecretKeyRingCollection> keyRingCollections)
Description copied from interface:KeyRingSelectionStrategyIterate over all keyRings in the givenMultiMapof keyRingCollections and return a newMultiMapwhich for every identifier (key of the map) contains all acceptable keyRings based on that identifier.- Specified by:
selectKeyRingsFromCollectionsin interfaceKeyRingSelectionStrategy<org.bouncycastle.openpgp.PGPSecretKeyRing,org.bouncycastle.openpgp.PGPSecretKeyRingCollection,O>- Parameters:
keyRingCollections- MultiMap of identifiers and keyRingCollections.- Returns:
- MultiMap of identifiers and acceptable keyRings.
-
-