class CollectionHelper {

    public static <T> LinkedHashSet<T> getSubset(LinkedHashSet<T> set, int offset, int num) {
        Validate.notNull(set, "set must not be null");
        Validate.isTrue(offset >= 0, "offset must be greater/equal zero");
        Validate.isTrue(num >= 0, "num must be greater/equal zero");

        LinkedHashSet<T> subSet = new LinkedHashSet<T>();
        if (offset > set.size()) {
            return subSet;
        }

        Iterator<T> iterator = set.iterator();
        for (int i = 0; i < set.size(); i++) {
            T next = iterator.next();
            if (i < offset) {
                continue;
            }
            subSet.add(next);
            if (subSet.size() == num) {
                break;
            }
        }

        return subSet;
    }

    private  CollectionHelper();

}