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

com.googlecode.javaewah.CloneableIterator Maven / Gradle / Ivy

There is a newer version: 4.0.0
Show newest version
package com.googlecode.javaewah;

/*
 * Copyright 2009-2016, Daniel Lemire, Cliff Moon, David McIntosh, Robert Becho, Google Inc., Veronika Zenz, Owen Kaser, Gregory Ssi-Yan-Kai, Rory Graves
 * Licensed under the Apache License, Version 2.0.
 */

/**
 * Like a standard Java iterator, except that you can clone it.
 *
 * @param  the data type of the iterator
 */
public interface CloneableIterator extends Cloneable {

    /**
     * @return whether there is more
     */
    boolean hasNext();

    /**
     * @return the next element
     */
    E next();

    /**
     * @return a copy
     * @throws CloneNotSupportedException this should never happen in practice
     */
    CloneableIterator clone() throws CloneNotSupportedException;

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy