private static Pattern NUMBER = Pattern.compile("^(\\-?[1-9]\\d*|0)(\\.\\d+)?$");
private static Pattern VALUE_PATTERN = Pattern.compile("\\[([^:]+):([^:]+)\\]");
private static InvalidIntervalValueException invalidFragment(boolean beginOrEnd, String value) {
String messageTemplate = beginOrEnd ? "Invalid begin value '%s'" : "Invalid end value '%s'";
return new InvalidIntervalValueException(String.format(messageTemplate, value));
}