Predicate<T> class

Compose functions that given a generic value T return a bool.

Constructors

Predicate(bool _predicate(T t))
Build a Predicate given a function returning a bool.
const
Predicate.not(bool predicate(T))
Build a Predicate that returns NOT (!) of the given predicate.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
not Predicate<T>
Compose this Predicate with the given predicate using NOT (!).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

and(Predicate<T> predicate) Predicate<T>
Compose this Predicate with the given predicate using AND.
call(T t) bool
Run the predicate and extract its bool value given t.
contramap<A>(T fun(A a)) Predicate<A>
Apply fun to the value of this Predicate<T> and return a new Predicate<A>.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
or(Predicate<T> predicate) Predicate<T>
Compose this Predicate with the given predicate using OR.
toString() String
A string representation of this object.
inherited
xor(Predicate<T> predicate) Predicate<T>
Compose this Predicate with the given predicate using XOR.

Operators

operator &(Predicate<T> predicate) Predicate<T>
Compose this Predicate with the given predicate using AND.
operator ==(Object other) bool
The equality operator.
inherited
operator ^(Predicate<T> predicate) Predicate<T>
Compose this Predicate with the given predicate using XOR.
operator |(Predicate<T> predicate) Predicate<T>
Compose this Predicate with the given predicate using OR.
operator ~() Predicate<T>
Build a Predicate that returns NOT (!) of the given predicate.