code: public void validateRange(Config config, T value, Comparable<T> min, Comparable<T>  max) {
      boolean isValid = min.compareTo(value) <= 0 && 0 <= max.compareTo(value);
      if (!isValid) {
        throw new MorphlineCompilationException(
          String.format("Invalid choice: '%s' (choose from {%s..%s})", 
                        value, 
                        min,
                        max), 
          config);
      }
    }
docs: Validates that the given value is contained in the range [min, max]