com.carrotsearch.console.jcommander.IParameterValidator Maven / Gradle / Ivy
The newest version!
/*
* console-tools
*
* Copyright (C) 2019, Carrot Search s.c.
* All rights reserved.
*/
package com.carrotsearch.console.jcommander;
/**
* The class used to validate parameters.
*
* @author Cedric Beust
*/
public interface IParameterValidator {
/**
* Validate the parameter.
*
* @param name The name of the parameter (e.g. "-host").
* @param value The value of the parameter that we need to validate
* @throws ParameterException Thrown if the value of the parameter is invalid.
*/
void validate(String name, String value) throws ParameterException;
}