public < T > List < T > apply ( final List < T > objects ) { List < T > results = new ArrayList < T > ( ) ; if ( objects == null || objects . size ( ) == 0 ) { return results ; } int size = objects . size ( ) ; int fromIndex = getOffset ( ) ; int toIndex = fromIndex + getCount ( ) ; if ( size < toIndex ) { toIndex = size ; } if ( fromIndex >= size || toIndex == fromIndex ) { } else { results . addAll ( objects . subList ( fromIndex , toIndex ) ) ; } return results ; }
Extracts a range from the specified object list according to this LIMIT constraint .