Package com.github.twitch4j.common.util
Class CollectionUtils
java.lang.Object
com.github.twitch4j.common.util.CollectionUtils
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
CollectionUtils
public CollectionUtils()
-
-
Method Details
-
chunked
Assigns elements of the given iterable to chunks not exceeding the desired size- Type Parameters:
T
- type of the iterable- Parameters:
iterable
- the source of elements to be assigned to a chunksize
- the maximum size of each chunk- Returns:
- a list of the chunks, or an empty list if the iterable yielded no elements
- Throws:
NullPointerException
- if the passed iterable is null
-