get
Returns the element at the specified position in an iterable.
Stream equivalent: stream.skip(position).findFirst().get() (throws NoSuchElementException if out of bounds)
Return
the element at the specified position in this
See also
Parameters
position of the element to return
Throws
if position is negative or greater than or equal to the size of this
Returns the element at the specified position in an iterable or a default value otherwise.
Stream equivalent:
stream.skip(position).findFirst().get()(throws NoSuchElementException if out of bounds)
Return
the element at the specified position in this, or defaultValue if this produces fewer that position + 1 elements and defaultValue is not null.
See also
Parameters
position of the element to return
the default value to return if position is greater than the size of this
Throws
if position is negative, or if position is greater than or equal to the number of elements remaining in this and defaultValue is null.
Advances thisposition + 1` times, returning the element at the positionth position.
Return
the element at the specified position in this
See also
Parameters
position of the element to return
Throws
if position is negative or greater than or equal to the number of elements remaining in this.
Advances thisposition + 1` times, returning the element at the positionth position or a default value otherwise.
Return
the element at the specified position in this, or defaultValue if this produces fewer that position + 1 elements and defaultValue is not null.
See also
Parameters
position of the element to return
the default value to return if the iterator is empty or if position is greater than the number of elements remaining in this
Throws
if position is negative, or if position is greater than or equal to the number of elements remaining in this and defaultValue is null.