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

org.mvel2.templates.util.CountIterator Maven / Gradle / Ivy

There is a newer version: 2.12.15
Show newest version
package org.mvel2.templates.util;

import java.util.Iterator;

/**
 * User: christopherbrock
 * Date: 10-Aug-2010
 * Time: 6:42:20 PM
 */
public class CountIterator implements Iterator {
  int cursor;
  int countTo;

  public CountIterator(int countTo) {
    this.countTo = countTo;
  }

  public boolean hasNext() {
    return cursor < countTo;
  }

  public Object next() {
    return cursor++;
  }

  public void remove() {
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy