MCPcopy
hub / github.com/OpenTSDB/opentsdb / BooleanValidator

Class BooleanValidator

src/tools/ConfigMetaType.java:226–237  ·  view source on GitHub ↗

Title: BooleanValidator Description: Validator for booleans (true|false)

Source from the content-addressed store, hash-verified

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>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…