summary refs log tree commit diff
path: root/crypto/src/util/collections/ISelector.cs
blob: 186b922d37504662db9e9e8ff3306e0b6d1e6f58 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using System;

namespace Org.BouncyCastle.Utilities.Collections
{
    /// <summary>Interface for matching objects in an <see cref="IStore{T}"/>.</summary>
    /// <typeparam name="T">The contravariant type of selectable objects.</typeparam>
    public interface ISelector<in T>
        : ICloneable
    {
        /// <summary>Match the passed in object, returning true if it would be selected by this selector, false
        /// otherwise.</summary>
        /// <param name="candidate">The object to be matched.</param>
        /// <returns><code>true</code> if the objects is matched by this selector, false otherwise.</returns>
        bool Match(T candidate);
    }
}