Java 类org.apache.commons.collections.ResettableIterator 实例源码

项目:openhab1-addons    文件:ModbusBinding.java   
private static Iterator<String> stringArrayIterator(final String[] chunks) {
    Iterator<String> settingIterator = new Iterator<String>() {

        private ResettableIterator inner = IteratorUtils.arrayIterator(chunks);

        @Override
        public String next() {
            return (String) inner.next();
        }

        @Override
        public boolean hasNext() {
            return inner.hasNext();
        }

        @Override
        public void remove() {
            inner.remove();
        }

    };
    return settingIterator;
}