public final class Validator<T> extends Object
Constructor and Description |
---|
Validator() |
Modifier and Type | Method and Description |
---|---|
<T extends Enum<T>> |
validateEnum(com.typesafe.config.Config config,
String value,
Class<T> type,
T... choices)
Validates that an enum of the given type with the given value exists, and that this enum is
contained in the given list of permitted choices; finally returns that enum object.
|
void |
validateRange(com.typesafe.config.Config config,
T value,
Comparable<T> min,
Comparable<T> max)
Validates that the given value is contained in the range [min, max]
|
public void validateRange(com.typesafe.config.Config config, T value, Comparable<T> min, Comparable<T> max)
public <T extends Enum<T>> T validateEnum(com.typesafe.config.Config config, String value, Class<T> type, T... choices)
Copyright © 2013–2015. All rights reserved.