Vec$VecConcreteExtension<T extends Object> extension
Methods only implemented when T
is a concrete type (non-nullable).
Why: Correctness of code and reduces bugs.
e.g. if nth
returns null on a nullable iterable, the nth element is
either null or the iterable does not have n elements. While if it returns Option, if the element
is null it returns Some(null)
and if it does not have n elements it returns None
- on
-
- Vec<
T>
- Vec<
Methods
-
pop(
) → T? -
Available on Vec<
Removes the last element from the Vec and returns it, or None if it is empty.T> , provided by the Vec$VecConcreteExtension extension