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

com.binfast.adpter.core.paramconvert.BooleanGetter Maven / Gradle / Ivy

There is a newer version: 1.0.5
Show newest version
package com.binfast.adpter.core.paramconvert;

import com.binfast.adpter.core.ParamsHandler;
import com.binfast.adpter.core.kit.StrKit;

public class BooleanGetter extends ParaGetter {
	
	public BooleanGetter(String parameterName, String defaultValue) {
		super(parameterName,defaultValue);
	}

	@Override
	public Boolean get(ParamsHandler c) {
		return c.getParaToBoolean(getParameterName(),getDefaultValue());
	}

	@Override
	protected Boolean to(String v) {
		if(StrKit.notBlank(v)){
			return Boolean.parseBoolean(v);
		}
		return null;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy