String lastLink ( ) { if ( totalResults == null || currentLimit == 0L ) { return null ; } Long lastOffset ; if ( totalResults % currentLimit == 0L ) { lastOffset = totalResults - currentLimit ; } else { // Truncation due to integral division gives floor-like behavior for free. lastOffset = totalResults / currentLimit * currentLimit ; } return urlWithUpdatedPagination ( lastOffset , currentLimit ) ; }
Returns the last page link ; null if no last page link is available .