|Modifier and Type||Method and Description|
Set the items to sample from.
void setCollection(Collection<? extends T> collection)
collection- the items to sample from
nItemsitems from the collection set by
setCollection(Collection), returning a new collection with the given samples. Implementations can decide what to do if
nItemsis bigger than the number of items in the collection.
nItems- the number of items to sample
nullif a sample cannot be made for any reason.