Tuple4<T0, T1, T2, T3> class

A finite fixed-length ordered list containing 4 dynamically-typed elements.

Inheritance
Available Extensions

Constructors

Tuple4(T0 item0, T1 item1, T2 item2, T3 item3)
Creates a tuple of length 4.
const
Tuple4.fromJson(Map<String, dynamic> map)
Creates an tuple from a map/JSON source.
factory
Tuple4.fromList(List list, [bool trim = false])
Creates an tuple from a list source.
factory
Tuple4.fromRecord((T0, T1, T2, T3) record)
Creates a tuple from a record.
factory

Properties

first → dynamic
The first element.
no setterinherited
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
item0 → T0
final
item1 → T1
final
item2 → T2
final
item3 → T3
final
iterator Iterator
A new Iterator that allows iterating the elements of this Iterable.
no setteroverride
last → dynamic
The last element.
no setterinherited
length int
Returns the constant length of this tuple.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
single → dynamic
Checks that this iterable has only one element, and returns that element.
no setterinherited

Methods

any(bool test(dynamic element)) bool
Checks whether any element of this iterable satisfies test.
inherited
asDynamic() Tuple4
Clones this tuple where the clone is cast with dynamically-typed items.
asType<U0, U1, U2, U3>() Tuple4<U0, U1, U2, U3>
Clones this tuple where the clone is cast with the specified type arguments.
cast<R>() Iterable<R>
A view of this iterable as an iterable of R instances.
inherited
contains(Object? element) bool
Whether the collection contains an element equal to element.
inherited
copyWith({T0? item0, T1? item1, T2? item2, T3? item3}) Tuple4<T0, T1, T2, T3>
Creates a copy tuple with the elements from this tuple with the value of each item optionally overridden.
copyWithout({required List<bool> indices}) Tuple
A list of boolean values indicating whether certain items in this tuple should be retained or discarded. The length of the list must be the same as the length of this tuple.
elementAt(int index) → dynamic
Returns the indexth element.
inherited
every(bool test(dynamic element)) bool
Checks whether every element of this iterable satisfies test.
inherited
expand<T>(Iterable<T> toElements(dynamic element)) Iterable<T>
Expands each element of this Iterable into zero or more elements.
inherited
firstWhere(bool test(dynamic element), {dynamic orElse()?}) → dynamic
The first element that satisfies the given predicate test.
inherited
fold<T>(T initialValue, T combine(T previousValue, dynamic element)) → T
Reduces a collection to a single value by iteratively combining each element of the collection with an existing value
inherited
followedBy(Iterable other) Iterable
Creates the lazy concatenation of this iterable and other.
inherited
forEach(void action(dynamic element)) → void
Invokes action on each element of this iterable in iteration order.
inherited
join([String separator = ""]) String
Converts each element to a String and concatenates the strings.
inherited
lastWhere(bool test(dynamic element), {dynamic orElse()?}) → dynamic
The last element that satisfies the given predicate test.
inherited
map<T>(T toElement(dynamic e)) Iterable<T>
The current elements of this iterable modified by toElement.
inherited
mapActions({required void item0(T0), required void item1(T1), required void item2(T2), required void item3(T3)}) → void
A utility method for mapping a function to every item in this tuple.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reduce(dynamic combine(dynamic value, dynamic element)) → dynamic
Reduces a collection to a single value by iteratively combining elements of the collection using the provided function.
inherited
singleWhere(bool test(dynamic element), {dynamic orElse()?}) → dynamic
The single element that satisfies test.
inherited
skip(int count) Iterable
Creates an Iterable that provides all but the first count elements.
inherited
skipWhile(bool test(dynamic value)) Iterable
Creates an Iterable that skips leading elements while test is satisfied.
inherited
take(int count) Iterable
Creates a lazy iterable of the count first elements of this iterable.
inherited
takeWhile(bool test(dynamic value)) Iterable
Creates a lazy iterable of the leading elements satisfying test.
inherited
toJson() Map<String, dynamic>
Converts this tuple into a map for JSON serialization.
toList({bool growable = true}) List
Creates a List containing the elements of this Iterable.
inherited
toRecord() → (T0, T1, T2, T3)
Converts this tuple into a record.
toSet() Set
Creates a Set containing the same elements as this iterable.
inherited
toString() String
Returns a string representation of (some of) the elements of this.
override
where(bool test(dynamic element)) Iterable
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
operator [](int index) → dynamic
Provides an indexable way to access this tuple's items.