Created
October 8, 2010 08:53
-
-
Save alexzhan/616529 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//setter and getter of pagination and currentPage is ignored | |
private List<Integer> pagination = new ArrayList<Integer>(); | |
int up = (currentPage / 20 + 1) * 20 + currentPage % 20 + 1 -10; | |
int down = (currentPage / 20) * 20 + currentPage % 20 - 10; | |
for( int i = down; i < up; i ++){ | |
if(i >= 1) | |
pagination.add(i); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment