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

webit.script.util.collection.CharSequenceIterAdapter 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 CharSequenceIterAdapter extends AbstractIter{

    private final CharSequence chars;
    private final int max;
    
    
    public CharSequenceIterAdapter(CharSequence chars) {
        this.chars = chars;
        this.max = chars.length() - 1;
    }

    
    @Override
    protected Character _next() {
        return chars.charAt(_index);
    }

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

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy