tryPeekNext

public E tryPeekNext(E other)

Fail-safe method for fetching data from next element (if exists).

Return

the next value if present, otherwise the other one.

Parameters

other

default value in case of failure