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

fi.evolver.utils.arg.LocalDateArg Maven / Gradle / Ivy

There is a newer version: 3.5.0
Show newest version
package fi.evolver.utils.arg;

import java.io.IOException;
import java.io.InputStream;
import java.sql.Date;
import java.time.LocalDate;


public class LocalDateArg extends Arg {

	public LocalDateArg(String name, LocalDate defaultValue) {
		super(LocalDate.class, name, false, defaultValue);
	}

	public LocalDateArg(String name) {
		super(LocalDate.class, name, true, null);
	}

	@Override
	public String getType() {
		return Date.class.getName();
	}


	@Override
	protected LocalDate convert(InputStream in) throws IOException {
		return LocalDate.parse(readUtf8Value(in));
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy