protected boolean checkSliceArguments ( long from , Long to ) { if ( from < 0 ) { throw new IllegalArgumentException ( "Slice from is negative: " + from ) ; } if ( to == null ) { if ( from == 0 ) { return false ; } } else if ( from > to ) { throw new IllegalArgumentException ( "Slice from is more than to: " + from + " > " + to ) ; } return true ; }
Called by sliced fetch to ensure that arguments are valid .