Saxon.Api

 

 

Saxon.Api

Interface IPredicate<in XdmItem>

All Known Implementing Classes
Predicate

public interface IPredicate<in XdmItem>

Interface that represents a predicate (boolean-valued Func) of one argument.

This is a functional interface whose functional method is Invoke(object).

Property Summary

  Func

Unwrapped Func property which evaluates to boolean.

 

Method Summary

 <T> IPredicate<T> And(IPredicate<T> other)

Returns a composed predicate that represents a short-circuiting logical AND of this predicate and another. When evaluating the composed predicate, if this predicate is false, then the other predicate is not evaluated.

 <T> bool Invoke(T item)

Evaluates this predicate on the given argument.

 IPredicate<XdmItem> Negate()

Returns a predicate that represents the logical negation of this predicate.

 <T> IPredicate<T> Or(IPredicate<T> other)

Returns a composed predicate that represents a short-circuiting logical OR of this predicate and another. When evaluating the composed predicate, if this predicate is true, then the other predicate is not evaluated.

 

Property Detail

Func

public  Func {get; }

Unwrapped Func property which evaluates to boolean.

Method Detail

And

public IPredicate<T> And<T>(IPredicate<T> other)

Returns a composed predicate that represents a short-circuiting logical AND of this predicate and another. When evaluating the composed predicate, if this predicate is false, then the other predicate is not evaluated.

Parameters:

other - A predicate that will be logically-ANDed with this predicate

Returns:

A composed predicate that represents the short-circuiting logical AND of this predicate the other predicate.

Invoke

public bool Invoke<T>(T item)

Evaluates this predicate on the given argument.

Parameters:

item - The input item

Returns:

true if the input argument matches the predicate, otherwise false.

Negate

public IPredicate<XdmItem> Negate()

Returns a predicate that represents the logical negation of this predicate.

Returns:

A predicate that represents the logical negation of this predicate.

Or

public IPredicate<T> Or<T>(IPredicate<T> other)

Returns a composed predicate that represents a short-circuiting logical OR of this predicate and another. When evaluating the composed predicate, if this predicate is true, then the other predicate is not evaluated.

Parameters:

other - A predicate that will be logically-ORed with this predicate

Returns:

A composed predicate that represents the short-circuiting logical OR of this predicate and the other predicate.