Tuple1<T1> extension
Extension methods on Record with 1 positional element.
- on
-
- (T1)
Properties
- first → T1
-
Available on (T1), provided by the Tuple1 extension
Returns 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
Returns the last element of this tuple.no setter - length → int
-
Available on (T1), provided by the Tuple1 extension
Returns 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 withvalue
added at the first position. -
addLast<
T> (T value) → (T1, T) -
Available on (T1), provided by the Tuple1 extension
Returns a new tuple withvalue
added at the last position. -
addSecond<
T> (T value) → (T1, T) -
Available on (T1), provided by the Tuple1 extension
Returns a new tuple withvalue
added at the second position. -
map<
R> (R callback(T1 first)) → R -
Available on (T1), provided by the Tuple1 extension
Applies the values of this tuple to an 1-ary function. -
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
An (untyped) List with the values of this tuple. -
toSet(
) → Set -
Available on (T1), provided by the Tuple1 extension
An (untyped) Set with the unique values of this tuple. -
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
.