public static <T extends Collection<E>, E extends Number> int countOdds(T list) { int count = 0; for (E elem : list) { count += elem.longValue() % 2; } return count; }
@Override public ProductWrapper<Long> generate(ProductWrapper<Long> wrapper) { assertInitialized(); ProductWrapper<E> tmp = generateFromSource(); if (tmp == null) return null; E feed = tmp.unwrap(); return wrapper.wrap(feed.longValue()); }