org.bouncycastle.x509

## Class X509CertPairStoreSelector

- java.lang.Object
- - org.bouncycastle.x509.X509CertPairStoreSelector

All Implemented Interfaces:
  java.lang.Cloneable, Selector

    public class X509CertPairStoreSelector
    extends java.lang.Object
    implements Selector

This class is an `Selector` like implementation to select certificates pairs, which are e.g. used for cross certificates. The set of criteria is given from two `X509CertStoreSelector`s which must be both matched.

See Also:
  `X509AttributeCertificate`, `X509Store`

### Constructor Summary

Constructors
Constructor and Description
`X509CertPairStoreSelector()`

### Method Summary

Methods
`java.lang.Object` `clone()` Returns a clone of this selector.
`X509CertificatePair` `getCertPair()` Returns the certificate pair which is used for testing on equality.
`X509CertStoreSelector` `getForwardSelector()` Returns the certicate selector for the forward part.
`X509CertStoreSelector` `getReverseSelector()` Returns the certicate selector for the reverse part.
`boolean` `match(java.lang.Object obj)` Decides if the given certificate pair should be selected.
`void` `setCertPair(X509CertificatePair certPair)` Set the certificate pair which is used for testing on equality.
`void` `setForwardSelector(X509CertStoreSelector forwardSelector)`
`void` `setReverseSelector(X509CertStoreSelector reverseSelector)`

### Methods inherited from class java.lang.Object

`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### X509CertPairStoreSelector

    public X509CertPairStoreSelector()

### Method Detail

#### getCertPair

    public X509CertificatePair getCertPair()

Returns the certificate pair which is used for testing on equality.

Returns:
  Returns the certificate pair which is checked.

#### setCertPair

    public void setCertPair(X509CertificatePair certPair)

Set the certificate pair which is used for testing on equality.

Parameters:
  `certPair` - The certPairChecking to set.

#### setForwardSelector

    public void setForwardSelector(X509CertStoreSelector forwardSelector)

Parameters:
  `forwardSelector` - The certificate selector for the forward part in the pair.

#### setReverseSelector

    public void setReverseSelector(X509CertStoreSelector reverseSelector)

Parameters:
  `reverseSelector` - The certificate selector for the reverse part in the pair.

#### clone

    public java.lang.Object clone()

Returns a clone of this selector.

Specified by:
  `clone` in interface `Selector`
Overrides:
  `clone` in class `java.lang.Object`
Returns:
  A clone of this selector.
See Also:
  `Object.clone()`

#### match

    public boolean match(java.lang.Object obj)

Decides if the given certificate pair should be selected. If `obj` is not a `X509CertificatePair` this method returns `false`.

Specified by:
  `match` in interface `Selector`
Parameters:
  `obj` - The `X509CertificatePair` which should be tested.
Returns:
  `true` if the object matches this selector.

#### getForwardSelector

    public X509CertStoreSelector getForwardSelector()

Returns the certicate selector for the forward part.

Returns:
  Returns the certicate selector for the forward part.

#### getReverseSelector

    public X509CertStoreSelector getReverseSelector()

Returns the certicate selector for the reverse part.

Returns:
  Returns the reverse selector for teh reverse part.