Title: BooleanValidator Description: Validator for booleans (true|false)
| 224 | * <p>Description: Validator for booleans (true|false)</p> |
| 225 | */ |
| 226 | public static class BooleanValidator implements ArgValueValidator { |
| 227 | /** |
| 228 | * {@inheritDoc} |
| 229 | * @see net.opentsdb.tools.ArgValueValidator#validate(net.opentsdb.tools.ConfigArgP.ConfigurationItem) |
| 230 | */ |
| 231 | @Override |
| 232 | public void validate(final ConfigurationItem citem) { |
| 233 | if(!"true".equalsIgnoreCase(citem.getValue()) && !"false".equalsIgnoreCase(citem.getValue())) { |
| 234 | throw new IllegalArgumentException("Invalid Boolean value [" + citem.getValue() + "] for " + citem.getName()); |
| 235 | } |
| 236 | } |
| 237 | } |
| 238 | |
| 239 | /** |
| 240 | * <p>Title: URLOrFileValidator</p> |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…