com.unit16.z.indexed.IteratorIndexed Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unit16-z Show documentation
Show all versions of unit16-z Show documentation
A collection of utilities for representing and manipulating time series and such.
package com.unit16.z.indexed;
import com.google.common.collect.UnmodifiableIterator;
final class IteratorIndexed extends UnmodifiableIterator {
private int index_ = 0;
private final Indexed indexed_;
public IteratorIndexed(Indexed i) {
indexed_ = i;
}
@Override
public boolean hasNext() { return index_ < indexed_.size(); }
@Override
public B next() {
final B b = indexed_.get(index_);
index_++;
return b;
}
}