FacetFilterGroup class final
Filter group of FilterFacet filters.
Example
Conjunctive facets group, optionally named 'colors',
corresponding to (color:red AND color:blue)
:
final filterGroup = FacetFilterGroup(
const FilterGroupID('colors', FilterOperator.and),
{
Filter.facet('color', 'red'),
Filter.facet('color', 'blue'),
},
);
The same example can be created using FilterGroup.facet :
final filterGroup = FilterGroup.facet(
name: 'colors',
filters: {
Filter.facet('color', 'red'),
Filter.facet('color', 'blue'),
},
operator: FilterOperator.and,
);
- Implemented types
- Available Extensions
Constructors
-
FacetFilterGroup(FilterGroupID groupID, Set<
FilterFacet> _filters) -
Creates a FilterGroup instance.
const
Properties
- first → FilterFacet
-
The first element.
no setterinherited
- groupID → FilterGroupID
-
Filter group ID (name and operator)
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isEmpty → bool
-
Whether this collection has no elements.
no setterinherited
- isNotEmpty → bool
-
Whether this collection has at least one element.
no setterinherited
-
iterator
→ Iterator<
FilterFacet> -
A new
Iterator
that allows iterating the elements of thisIterable
.no setterinherited - last → FilterFacet
-
The last element.
no setterinherited
- length → int
-
The number of elements in this.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- single → FilterFacet
-
Checks that this iterable has only one element, and returns that element.
no setterinherited
Methods
-
add(
FilterFacet value) → bool -
Adds
value
to the set.inherited -
addAll(
Iterable< FilterFacet> elements) → void -
Adds all
elements
to this set.inherited -
any(
bool test(FilterFacet)) → bool -
Checks whether any element of this iterable satisfies
test
.inherited -
cast<
T> () → Set< T> -
A view of this iterable as an iterable of
R
instances.inherited -
clear(
) → void -
Removes all elements from the set.
inherited
-
contains(
Object? element) → bool -
Whether the collection contains an element equal to
element
.inherited -
containsAll(
Iterable< Object?> other) → bool -
Whether this set contains all the elements of
other
.inherited -
copyWith(
{FilterGroupID? groupID, Set< FilterFacet> ? filters}) → FacetFilterGroup -
Make a copy of the facet filters group.
override
-
difference(
Set< Object?> other) → Set<FilterFacet> -
Creates a new set with the elements of this that are not in
other
.inherited -
elementAt(
int index) → FilterFacet -
Returns the
index
th element.inherited -
every(
bool test(FilterFacet)) → bool -
Checks whether every element of this iterable satisfies
test
.inherited -
expand<
T> (Iterable< T> f(FilterFacet)) → Iterable<T> -
Expands each element of this Iterable into zero or more elements.
inherited
-
firstWhere(
bool test(FilterFacet), {FilterFacet orElse()?}) → FilterFacet -
The first element that satisfies the given predicate
test
.inherited -
fold<
T> (T initialValue, T combine(T previousValue, FilterFacet element)) → T -
Reduces a collection to a single value by iteratively combining each
element of the collection with an existing value
inherited
-
followedBy(
Iterable< FilterFacet> other) → Iterable<FilterFacet> -
Creates the lazy concatenation of this iterable and
other
.inherited -
forEach(
void f(FilterFacet)) → void -
Invokes
action
on each element of this iterable in iteration order.inherited -
intersection(
Set< Object?> other) → Set<FilterFacet> -
Creates a new set which is the intersection between this set and
other
.inherited -
join(
[String separator = '']) → String -
Converts each element to a String and concatenates the strings.
inherited
-
lastWhere(
bool test(FilterFacet), {FilterFacet orElse()?}) → FilterFacet -
The last element that satisfies the given predicate
test
.inherited -
lookup(
Object? element) → FilterFacet? -
If an object equal to
object
is in the set, return it.inherited -
map<
T> (T f(FilterFacet)) → Iterable< T> -
The current elements of this iterable modified by
toElement
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reduce(
FilterFacet combine(FilterFacet value, FilterFacet element)) → FilterFacet -
Reduces a collection to a single value by iteratively combining elements
of the collection using the provided function.
inherited
-
remove(
Object? value) → bool -
Removes
value
from the set.inherited -
removeAll(
Iterable< Object?> elements) → void -
Removes each element of
elements
from this set.inherited -
removeWhere(
bool test(FilterFacet)) → void -
Removes all elements of this set that satisfy
test
.inherited -
retainAll(
Iterable< Object?> elements) → void -
Removes all elements of this set that are not elements in
elements
.inherited -
retainWhere(
bool test(FilterFacet)) → void -
Removes all elements of this set that fail to satisfy
test
.inherited -
retype<
T> () → Set< T> -
inherited
-
singleWhere(
bool test(FilterFacet), {FilterFacet orElse()?}) → FilterFacet -
The single element that satisfies
test
.inherited -
skip(
int n) → Iterable< FilterFacet> -
Creates an Iterable that provides all but the first
count
elements.inherited -
skipWhile(
bool test(FilterFacet)) → Iterable< FilterFacet> -
Creates an
Iterable
that skips leading elements whiletest
is satisfied.inherited -
take(
int n) → Iterable< FilterFacet> -
Creates a lazy iterable of the
count
first elements of this iterable.inherited -
takeWhile(
bool test(FilterFacet)) → Iterable< FilterFacet> -
Creates a lazy iterable of the leading elements satisfying
test
.inherited -
toList(
{bool growable = true}) → List< FilterFacet> -
Creates a List containing the elements of this Iterable.
inherited
-
toSet(
) → Set< FilterFacet> -
Creates a Set containing the same elements as this iterable.
inherited
-
toString(
) → String - A string representation of this object.
-
union(
Set< FilterFacet> other) → Set<FilterFacet> -
Creates a new set which contains all the elements of this set and
other
.inherited -
where(
bool test(FilterFacet)) → Iterable< FilterFacet> -
Creates a new lazy Iterable with all elements that satisfy the
predicate
test
.inherited -
whereType<
T> () → Iterable< T> -
Creates a new lazy Iterable with all elements that have type
T
.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override