Android Utililty Methods Collection Sub Collection Get

List of utility methods to do Collection Sub Collection Get

Description

The list of methods to do Collection Sub Collection Get are organized into topic(s).

Method

Collectionsubset(Collection c, int size, java.util.Random rand)
subset
ArrayList list = new ArrayList(c);
int realSize = (size < c.size()) ? size : c.size();
java.util.Collections.shuffle(list, rand);
return list.subList(0, realSize);