List of usage examples for org.apache.mahout.common.iterator CountingIterator CountingIterator
public CountingIterator(int to)
From source file:org.gpfvic.mahout.cf.taste.impl.model.BooleanItemPreferenceArray.java
License:Apache License
@Override public Iterator<Preference> iterator() { return Iterators.transform(new CountingIterator(length()), new Function<Integer, Preference>() { @Override//from w w w . ja v a 2s .c o m public Preference apply(Integer from) { return new PreferenceView(from); } }); }