mirror of
https://github.com/apache/commons-collections.git
synced 2025-02-12 21:15:45 +00:00
Use long instead of int.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1682774 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
121dba83e0
commit
b3fd256017
@ -238,7 +238,7 @@ public class FluentIterable<E> implements Iterable<E> {
|
||||
* @return a new iterable, providing a bounded view of this iterable
|
||||
* @throws IllegalArgumentException if maxSize is negative
|
||||
*/
|
||||
public FluentIterable<E> limit(final int maxSize) {
|
||||
public FluentIterable<E> limit(final long maxSize) {
|
||||
return of(IterableUtils.boundedIterable(iterable, maxSize));
|
||||
}
|
||||
|
||||
@ -271,7 +271,7 @@ public class FluentIterable<E> implements Iterable<E> {
|
||||
* the first N elements
|
||||
* @throws IllegalArgumentException if elementsToSkip is negative
|
||||
*/
|
||||
public FluentIterable<E> skip(int elementsToSkip) {
|
||||
public FluentIterable<E> skip(final long elementsToSkip) {
|
||||
return of(IterableUtils.skippingIterable(iterable, elementsToSkip));
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,7 @@ public class IterableUtils {
|
||||
* @return a bounded view on the specified iterable
|
||||
* @throws IllegalArgumentException if maxSize is negative
|
||||
*/
|
||||
public static <E> Iterable<E> boundedIterable(final Iterable<E> iterable, final int maxSize) {
|
||||
public static <E> Iterable<E> boundedIterable(final Iterable<E> iterable, final long maxSize) {
|
||||
if (maxSize < 0) {
|
||||
throw new IllegalArgumentException("maxSize parameter must not be negative.");
|
||||
}
|
||||
@ -311,7 +311,7 @@ public class IterableUtils {
|
||||
* @return a view of the specified iterable, skipping the first N elements
|
||||
* @throws IllegalArgumentException if elementsToSkip is negative
|
||||
*/
|
||||
public static <E> Iterable<E> skippingIterable(final Iterable<E> iterable, final int elementsToSkip) {
|
||||
public static <E> Iterable<E> skippingIterable(final Iterable<E> iterable, final long elementsToSkip) {
|
||||
if (elementsToSkip < 0) {
|
||||
throw new IllegalArgumentException("elementsToSkip parameter must not be negative.");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user