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

com.softicar.platform.common.date.DateItemIterator Maven / Gradle / Ivy

Go to download

The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.

There is a newer version: 50.0.0
Show newest version
package com.softicar.platform.common.date;

import java.util.Iterator;

/**
 * Iterator over a range of {@link DateItem}.
 * 
 * @param 
 *            the type of the date items
 * @author Oliver Richers
 */
public class DateItemIterator> implements Iterator {

	public DateItemIterator(T first, T last) {

		m_current = first.getPrevious();
		m_last = last;
	}

	@Override
	public boolean hasNext() {

		return m_current.compareTo(m_last) < 0;
	}

	@Override
	public T next() {

		m_current = m_current.getNext();
		return m_current;
	}

	@Override
	public void remove() {

		throw new UnsupportedOperationException();
	}

	private T m_current;
	private final T m_last;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy