Tuple1<T1> class

Tuple with 1 element.

Inheritance

Constructors

Tuple1(T1 first)
Const constructor.
const

Properties

first → T1
Returns the first element of this tuple.
final
hashCode int
The hash code for this object.
no setteroverride
iterable Iterable<Object?>
An Iterable over the values of this tuple.
no setteroverride
last → T1
Returns the last element of this tuple.
no setter
length int
The number of elements in the tuple.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addFirst<T>(T value) Tuple2<T, T1>
Returns a new tuple with value added at the first position.
addLast<T>(T value) Tuple2<T1, T>
Returns a new tuple with value added at the last position.
addSecond<T>(T value) Tuple2<T1, T>
Returns a new tuple with value added at the second position.
map<R>(covariant R callback(T1 first)) → R
Applies the values of this tuple to an n-ary function.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeFirst() Tuple0
Returns a new tuple with the first element removed.
removeLast() Tuple0
Returns a new tuple with the last element removed.
toList({bool growable = false}) List<Object?>
A (untyped) List with the values of this tuple.
inherited
toSet() Set<Object?>
A (untyped) Set with the unique values of this tuple.
inherited
toString() String
A string representation of this tuple.
inherited
withFirst<T>(T value) Tuple1<T>
Returns a new tuple with the first element replaced by value.
withLast<T>(T value) Tuple1<T>
Returns a new tuple with the last element replaced by value.

Operators

operator ==(Object other) bool
The equality operator.
override

Static Methods

fromList<T>(List<T> list) Tuple1<T>
List constructor.
override