protected int calculateTo ( final int from , final int count , final int size ) { int to = size ; if ( count != - 1 ) { to = from + count ; if ( to > size ) { to = size ; } } return to ; }
Calculates TO .