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

org.simpleflatmapper.lightningcsv.parser.CellConsumer Maven / Gradle / Ivy

Go to download

Java library to map flat record - ResultSet, csv - to java object with minimum configuration and low footprint.

There is a newer version: 9.0.2
Show newest version
package org.simpleflatmapper.lightningcsv.parser;

//IFJAVA8_START
import java.util.function.Consumer;
//IFJAVA8_END

//IFJAVA8_START
@FunctionalInterface
//IFJAVA8_END
public interface CellConsumer {
	void newCell(char[] chars, int offset, int length);
//IFJAVA8_START
	default
//IFJAVA8_END

	/**
	 * @return false if the row was skipped
	 */
	boolean endOfRow()
//IFJAVA8_START
	{
		return true;
	}
//IFJAVA8_END
	;
//IFJAVA8_START
	default
//IFJAVA8_END
	void end()
//IFJAVA8_START
	{
	}
//IFJAVA8_END
	;


//IFJAVA8_START
	static CellConsumer of(Consumer c) {
		return ((chars, offset, length) -> c.accept(new String(chars, offset, length)));
	}
//IFJAVA8_END
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy