FilteredElementList class

An indexable collection of a node's descendants in the document tree, filtered so that only elements are in the collection.

Inheritance
Implemented types
Mixed-in types

Constructors

FilteredElementList(Node node)
Creates a collection of the elements that descend from a node.

Properties

first ↔ Element
The first element.
getter/setter pairinherited-setteroverride-getter
hashCode → int
The hash code for this object.
no setterinherited
isEmpty → bool
Whether this collection has no elements.
no setteroverride
isNotEmpty → bool
Whether this collection has at least one element.
no setterinherited
iterator → Iterator<Element>
A new Iterator that allows iterating the elements of this Iterable.
no setteroverride
last ↔ Element
The last element.
getter/setter pairinherited-setteroverride-getter
length ↔ int
The number of elements in this Iterable.
getter/setter pairoverride
reversed → Iterable<Element>
An Iterable of the objects in this list in reverse order.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
single → Element
Checks that this iterable has only one element, and returns that element.
no setteroverride

Methods

add(Element element) → void
Adds value to the end of this list, extending the length by one.
override
addAll(Iterable<Element> iterable) → void
Appends all objects of iterable to the end of this list.
override
any(bool test(Element)) → bool
Checks whether any element of this iterable satisfies test.
override
asMap() → Map<int, Element>
An unmodifiable Map view of this list.
inherited
cast<R>() → List<R>
Returns a view of this list as a list of R instances.
inherited
clear() → void
Removes all objects from this list; the length of the list becomes zero.
override
contains(Object? element) → bool
Whether the collection contains an element equal to element.
override
elementAt(int index) → Element
Returns the indexth element.
override
every(bool test(Element)) → bool
Checks whether every element of this iterable satisfies test.
override
expand<T>(Iterable<T> f(Element)) → Iterable<T>
Expands each element of this Iterable into zero or more elements.
override
fillRange(int start, int end, [Element? fill]) → void
Overwrites a range of elements with fillValue.
override
firstWhere(bool test(Element), {Element orElse()?}) → Element
The first element that satisfies the given predicate test.
override
fold<T>(T initialValue, T combine(T previousValue, Element element)) → T
Reduces a collection to a single value by iteratively combining each element of the collection with an existing value
override
followedBy(Iterable<Element> other) → Iterable<Element>
Creates the lazy concatenation of this iterable and other.
inherited
forEach(void action(Element element)) → void
Invokes action on each element of this iterable in iteration order.
override
getRange(int start, int end) → Iterable<Element>
Creates an Iterable that iterates over a range of elements.
override
indexOf(Object? element, [int start = 0]) → int
The first index of element in this list.
override
indexWhere(bool test(Element), [int start = 0]) → int
The first index in the list that satisfies the provided test.
inherited
insert(int index, Element element) → void
Inserts element at position index in this list.
override
insertAll(int index, Iterable<Element> iterable) → void
Inserts all objects of iterable at position index in this list.
override
join([String separator = '']) → String
Converts each element to a String and concatenates the strings.
override
lastIndexOf(Object? element, [int? start]) → int
The last index of element in this list.
override
lastIndexWhere(bool test(Element), [int? start]) → int
The last index in the list that satisfies the provided test.
inherited
lastWhere(bool test(Element), {Element orElse()?}) → Element
The last element that satisfies the given predicate test.
override
map<T>(T f(Element)) → Iterable<T>
The current elements of this iterable modified by toElement.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reduce(Element combine(Element, Element)) → Element
Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.
override
remove(Object? element) → bool
Removes the first occurrence of value from this list.
override
removeAt(int index) → Element
Removes the object at position index from this list.
override
removeLast() → Element
Removes and returns the last object in this list.
override
removeRange(int start, int end) → void
Removes a range of elements from the list.
override
removeWhere(bool test(Element)) → void
Removes all objects from this list that satisfy test.
inherited
replaceRange(int start, int end, Iterable<Element> newContents) → void
Replaces a range of elements with the elements of replacements.
override
retainWhere(bool test(Element)) → void
Removes all objects from this list that fail to satisfy test.
inherited
setAll(int index, Iterable<Element> iterable) → void
Overwrites elements with the objects of iterable.
inherited
setRange(int start, int end, Iterable<Element> iterable, [int skipCount = 0]) → void
Writes some elements of iterable into a range of this list.
override
shuffle([Random? random]) → void
Shuffles the elements of this list randomly.
inherited
singleWhere(bool test(Element), {Element orElse()?}) → Element
The single element that satisfies test.
override
skip(int count) → Iterable<Element>
Creates an Iterable that provides all but the first count elements.
inherited
skipWhile(bool test(Element)) → Iterable<Element>
Creates an Iterable that skips leading elements while test is satisfied.
inherited
sort([int compare(Element, Element)?]) → void
Sorts this list according to the order specified by the compare function.
override
sublist(int start, [int? end]) → List<Element>
Returns a new list containing the elements between start and end.
override
take(int count) → Iterable<Element>
Creates a lazy iterable of the count first elements of this iterable.
inherited
takeWhile(bool test(Element)) → Iterable<Element>
Creates a lazy iterable of the leading elements satisfying test.
inherited
toList({bool growable = true}) → List<Element>
Creates a List containing the elements of this Iterable.
override
toSet() → Set<Element>
Creates a Set containing the same elements as this iterable.
override
toString() → String
A string representation of this object.
inherited
where(bool test(Element)) → Iterable<Element>
Creates a new lazy Iterable with all elements that satisfy the predicate test.
override
whereType<T>() → Iterable<T>
Creates a new lazy Iterable with all elements that have type T.
inherited

Operators

operator +(List<Element> other) → List<Element>
Returns the concatenation of this list and other.
inherited
operator ==(Object other) → bool
The equality operator.
inherited
operator [](int index) → Element
The object at the given index in the list.
override
operator []=(int index, Element value) → void
Sets the value at the given index in the list to value.
override