/**
  * Gets last element of this list.
  *
  * @return Last element or {@code null} if list is empty.
  */
 @Nullable
 public V last() {
   return vals.isEmpty() ? null : vals.getLast();
 }