src/main/java/com/ngrok/definitions/Page.java
@SuppressWarnings("unchecked")
    public CompletionStage<Optional<Page<T>>> next() {
        return page.getNextPageUri()
            .map(nextPageUri -> apiClient.sendRequest(nextPageUri, (Class<T>) this.page.getClass())
                .thenApply(nextPage -> Optional.of(new Page<>(this.apiClient, nextPage)))
            )
            .orElseGet(() -> CompletableFuture.completedFuture(Optional.empty()));
    }
/**
     * Fetches the next page of responses, if any.
     *
     * @return a future encapsulating a possible next page
     */
Fetches the next page of responses, if any.
@return a future encapsulating a possible next page
Fetches the next page of responses if any . @return a future encapsulating a possible next page
@SuppressWarnings("unchecked")
    public CompletionStage<Optional<Page<T>>> next() {
        return page.getNextPageUri()
            .map(nextPageUri -> apiClient.sendRequest(nextPageUri, (Class<T>) this.page.getClass())
                .thenApply(nextPage -> Optional.of(new Page<>(this.apiClient, nextPage)))
            )
            .orElseGet(() -> CompletableFuture.completedFuture(Optional.empty()));
    }
@ SuppressWarnings ( "unchecked" ) public CompletionStage < Optional < Page < T > > > next ( ) { return page . getNextPageUri ( ) . map ( nextPageUri -> apiClient . sendRequest ( nextPageUri , ( Class < T > ) this . page . getClass ( ) ) . thenApply ( nextPage -> Optional . of ( new Page < > ( this . apiClient , nextPage ) ) ) ) . orElseGet ( ( ) -> CompletableFuture . completedFuture ( Optional . empty ( ) ) ) ; }
Fetches the next page of responses, if any.
Fetches the next page of responses if any .