Tuple1<T1> extension
Extension methods on Record with 1 positional element.
- on
-
- (T1)
Properties
- first → T1
-
Available on (T1), provided by the Tuple1 extension
The first element of this tuple.no setter - iterable → Iterable
-
Available on (T1), provided by the Tuple1 extension
An untyped Iterable over the values of this tuple.no setter - last → T1
-
Available on (T1), provided by the Tuple1 extension
The last element of this tuple.no setter - length → int
-
Available on (T1), provided by the Tuple1 extension
The number of elements in the tuple.no setter
Methods
-
addFirst<
T> (T value) → (T, T1) -
Available on (T1), provided by the Tuple1 extension
Returns a new tuple withvalueadded at the first position. -
addLast<
T> (T value) → (T1, T) -
Available on (T1), provided by the Tuple1 extension
Returns a new tuple withvalueadded at the last position. -
addSecond<
T> (T value) → (T1, T) -
Available on (T1), provided by the Tuple1 extension
Returns a new tuple withvalueadded at the second position. -
map<
R> (R callback(T1 first)) → R -
Available on (T1), provided by the Tuple1 extension
Transforms the elements of this tuple usingcallback. -
removeFirst(
) → () -
Available on (T1), provided by the Tuple1 extension
Returns a new tuple with the first element removed. -
removeLast(
) → () -
Available on (T1), provided by the Tuple1 extension
Returns a new tuple with the last element removed. -
toList(
) → List -
Available on (T1), provided by the Tuple1 extension
Converts this tuple to an untyped List. -
toSet(
) → Set -
Available on (T1), provided by the Tuple1 extension
Converts this tuple to an untyped Set of unique values. -
withFirst<
T> (T value) → (T) -
Available on (T1), provided by the Tuple1 extension
Returns a new tuple with the first element replaced byvalue. -
withLast<
T> (T value) → (T) -
Available on (T1), provided by the Tuple1 extension
Returns a new tuple with the last element replaced byvalue.