public CompositeRegistryIterator() { this.count = registries.length; this.idx = 0; this.iterator = registries[idx].iterator(); }
/** * @return Returns true if there exists registry that's not been iterated in entiry, else false. */ @Override public boolean hasNext() { boolean status = iterator.hasNext(); if (status == false && idx < count - 1) { idx = idx + 1; iterator = registries[idx].iterator(); if (iterator.hasNext()) { status = true; } } return status; }