HeimdallPredicate<T> class final

Predicate used to select items before a rule condition is evaluated.

Predicates return true for items that should remain in the rule selection. Use HeimdallPredicate.allOf, HeimdallPredicate.anyOf, HeimdallPredicate.noneOf, and, or, and not to compose reusable selections outside the fluent builder chain.

Constructors

HeimdallPredicate(String description, bool test(T item, HeimdallProject project))
Creates a predicate with a readable description.
const
HeimdallPredicate.allOf(Iterable<HeimdallPredicate<T>> predicates, {String? description})
Creates a predicate that requires every predicate in predicates.
factory
HeimdallPredicate.anyOf(Iterable<HeimdallPredicate<T>> predicates, {String? description})
Creates a predicate that accepts any predicate in predicates.
factory
HeimdallPredicate.noneOf(Iterable<HeimdallPredicate<T>> predicates, {String? description})
Creates a predicate that rejects every predicate in predicates.
factory

Properties

description String
Text used in generated rule descriptions.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
test bool Function(T item, HeimdallProject project)
Selection callback.
final

Methods

and(HeimdallPredicate<T> other) HeimdallPredicate<T>
Returns a predicate that requires both predicates to match.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
not() HeimdallPredicate<T>
Returns a reusable predicate object with this predicate's result inverted.
or(HeimdallPredicate<T> other) HeimdallPredicate<T>
Returns a predicate that accepts either predicate.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited