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

org.unix4j.io.Input Maven / Gradle / Ivy

There is a newer version: 0.6
Show newest version
package org.unix4j.io;

import java.util.Iterator;

import org.unix4j.line.Line;

/**
 * Represents a line-by-line input device.
 */
public interface Input extends Iterable {
	/**
	 * Returns true if there are more lines to be read.
	 * 
	 * @return true if more lines exist
	 */
	boolean hasMoreLines();

	/**
	 * Reads the next line. Returns null if no next line exists.
	 * 
	 * @return the next line, or null if no next line exists.
	 */
	Line readLine();

	/**
	 * Returns an immutable iterator over all lines returned by this input
	 * object.
	 * 
	 * @return an immutable line iterator
	 */
	@Override
	public Iterator iterator();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy