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

io.github.warnotte.obj2gui2.Validators.ValidatorImpl Maven / Gradle / Ivy

Go to download

This library aimed to generated swing interface base on introspection and annotation of DTOs

There is a newer version: 1.3.3
Show newest version
/**
 * 
 */
package io.github.warnotte.obj2gui2.Validators;

/**
 * @author Warnotte Renaud
 *
 */
public class ValidatorImpl implements Validator
{
	/* (non-Javadoc)
	 * @see GuiGenerator.Validator#valideValue()
	 */
	
	public T valideValue(O o, T oldValue, T value ) throws ValidationException
	{
		System.err.println("i'll validate = "+value);// TODO Auto-generated method stub
		
		// TELL THE USER SOMETHING IS WRONG AND DON'T CHANGE VALUE
		if (value<0.50)
			throw new ValidationException("Value must be greater than 0.5");
		// OR 
		//if (value<0.50)
		//	throw new ValidationException("Value must be greater than 0.5");
			
		return value;
		
	}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy