ModelCollection<C extends ModelCollection<C, T, I, R>, T extends Model<T, I>, I, R extends ModelRef<T, I, R>> class
- Implemented types
-
- Available Extensions
Properties
-
first
→ R
-
The first element.
no setteroverride
-
firstOrNull
→ R?
-
no setter
-
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 setteroverride
-
iterator
→ Iterator<R>
-
A new
Iterator
that allows iterating the elements of this Iterable
.
no setteroverride
-
last
→ R
-
The last element.
no setteroverride
-
lastOrNull
→ R?
-
no setter
-
length
→ int
-
The number of elements in this.
no setteroverride
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
single
→ R
-
Checks that this iterable has only one element, and returns that element.
no setteroverride
-
singleOrNull
→ R?
-
no setter
Methods
-
any(bool test(R element))
→ bool
-
Checks whether any element of this iterable satisfies
test
.
override
-
cast<A>()
→ Iterable<A>
-
A view of this iterable as an iterable of
R
instances.
override
-
contains(Object? obj)
→ bool
-
Whether the collection contains an element equal to
element
.
override
-
elementAt(int index)
→ R
-
Returns the
index
th element.
override
-
every(bool test(R element))
→ bool
-
Checks whether every element of this iterable satisfies
test
.
override
-
expand<A>(Iterable<A> toElements(R element))
→ Iterable<A>
-
Expands each element of this Iterable into zero or more elements.
override
-
firstWhere(bool test(R element), {R orElse()?})
→ R
-
The first element that satisfies the given predicate
test
.
override
-
firstWhereOrNull(bool test(R element))
→ R?
-
-
fold<A>(A initialValue, A combine(A previousValue, R element))
→ A
-
Reduces a collection to a single value by iteratively combining each
element of the collection with an existing value
override
-
followedBy(Iterable<R> other)
→ Iterable<R>
-
Creates the lazy concatenation of this iterable and
other
.
override
-
forEach(void action(R element))
→ void
-
Invokes
action
on each element of this iterable in iteration order.
override
-
join([String separator = ""])
→ String
-
Converts each element to a String and concatenates the strings.
override
-
lastWhere(bool test(R element), {R orElse()?})
→ R
-
The last element that satisfies the given predicate
test
.
override
-
lastWhereOrNull(bool test(R element))
→ R?
-
-
load(T model)
→ R
-
-
loadAll(Iterable<T> state)
→ List<R>
-
-
map<A>(A toElement(R e))
→ Iterable<A>
-
The current elements of this iterable modified by
toElement
.
override
-
none(bool test(R element))
→ bool
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
reduce(R combine(R value, R element))
→ R
-
Reduces a collection to a single value by iteratively combining elements
of the collection using the provided function.
override
-
remove()
→ bool
-
-
set(Iterable<T> models, {bool where(R m)?})
→ List<R>
-
-
singleWhere(bool test(R element), {R orElse()?})
→ R
-
The single element that satisfies
test
.
override
-
singleWhereOrNull(bool test(R element))
→ R?
-
-
skip(int count)
→ Iterable<R>
-
Creates an Iterable that provides all but the first
count
elements.
override
-
skipWhile(bool test(R value))
→ Iterable<R>
-
Creates an
Iterable
that skips leading elements while test
is satisfied.
override
-
stream({bool immediate = true})
→ Stream<C>
-
-
take(int count)
→ Iterable<R>
-
Creates a lazy iterable of the
count
first elements of this iterable.
override
-
takeWhile(bool test(R value))
→ Iterable<R>
-
Creates a lazy iterable of the leading elements satisfying
test
.
override
-
toList({bool growable = true})
→ List<R>
-
Creates a List containing the elements of this Iterable.
override
-
toSet()
→ Set<R>
-
Creates a Set containing the same elements as this iterable.
override
-
toString()
→ String
-
A string representation of this object.
inherited
-
watch()
→ Stream<Iterable<R>>
-
-
where(bool test(R element))
→ C
-
Creates a new lazy Iterable with all elements that satisfy the
predicate
test
.
override
-
whereType<A>()
→ Iterable<A>
-
Creates a new lazy Iterable with all elements that have type
T
.
override