class CollectionHelper {

    public static <T> List<T> getSublist(List<T> list, int offset, int num) {
        Validate.notNull(list, "list must not be null");
        Validate.isTrue(offset >= 0, "offset must be greater/equal zero");
        Validate.isTrue(num >= 0, "num must be greater/equal zero");
        int o = Math.min(list.size(), offset);
        int n = Math.min(num, list.size() - o);
        return list.subList(o, o + n);
    }

    private  CollectionHelper();

}