All Downloads are FREE. Search and download functionalities are using the official Maven repository.

webit.script.util.collection.ArrayIterAdapter Maven / Gradle / Ivy

There is a newer version: 1.5.2
Show newest version
// Copyright (c) 2013, Webit Team. All Rights Reserved.
package webit.script.util.collection;

/**
 *
 * @author Zqq
 */
public class ArrayIterAdapter extends AbstractIter {

    private final E[] array;
    private final int max;

    public ArrayIterAdapter(E[] array) {
        this.array = array;
        this.max = array.length - 1;
    }

    @Override
    protected E _next() {
        return array[_index];
    }

    public boolean hasNext() {
        return _index < max;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy