webit.script.util.collection.CharSequenceIterAdapter Maven / Gradle / Ivy
// 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