@Override public boolean isValid(char c) { return isUnreserved(c) || isSubDelimiter(c) || c == ':'; } },
@Override public boolean isValid(char c) { return isUnreserved(c) || isSubDelimiter(c); } },
/** * Indicates whether the given character is in the <i>pchar</i> set. * * @see <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986, appendix A</a> */ protected static boolean isPchar(char c) { return isUnreserved(c) || isSubDelimiter(c) || c == ':' || c == '@'; }
/** * Indicates whether the given character is in the <i>reserved</i> set. * * @see <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986, appendix A</a> */ protected static boolean isReserved(char c) { return isGenericDelimiter(c) || isSubDelimiter(c); }
@Override public boolean isValid(final char c) { return isUnreserved(c) || isSubDelimiter(c) || c == ':'; } },
@Override public boolean isValid(final char c) { return isUnreserved(c) || isSubDelimiter(c); } },
/** * Indicates whether the given character is in the <i>reserved</i> set. * * @see <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986, appendix A</a> */ public static boolean isReserved(final char c) { return isGenericDelimiter(c) || isSubDelimiter(c); }
/** * Indicates whether the given character is in the <i>pchar</i> set. * * @see <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986, appendix A</a> */ public static boolean isPchar(final char c) { return isUnreserved(c) || isSubDelimiter(c) || c == ':' || c == '@'; }
@Test void testIsSubDelimiter_specialCase() { // special case as I dont know how to add singletquote to the parameterized CsvSource assertTrue(CharUtil.isSubDelimiter('\'')); }
@ParameterizedTest (name = "{index} : CharUtil.isSubDelimiter({1}) == {0}") @CsvSource({ // only generic delimiters "true, !", "true, $", "true, &", "true, (", "true, )", "true, *", "true, +", "true, ','", "true, ;", "true, =", // few non generic delimters "false, #", "false, ]" }) void testIsSubDelimiter(final boolean expected, final char input) { assertEquals(expected, CharUtil.isSubDelimiter(input)); }
@Override public boolean isValid(final char c) { return isUnreserved(c) || isSubDelimiter(c) || c == ':'; } },
@Override public boolean isValid(final char c) { return isUnreserved(c) || isSubDelimiter(c); } },
/** * Indicates whether the given character is in the <i>reserved</i> set. * * @see <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986, appendix A</a> */ public static boolean isReserved(final char c) { return isGenericDelimiter(c) || isSubDelimiter(c); }
/** * Indicates whether the given character is in the <i>pchar</i> set. * * @see <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986, appendix A</a> */ public static boolean isPchar(final char c) { return isUnreserved(c) || isSubDelimiter(c) || c == ':' || c == '@'; }
/** * Indicates whether the given character is in the <i>reserved</i> set. * * @see <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986, appendix A</a> */ protected static boolean isReserved(char c) { return isGenericDelimiter(c) || isSubDelimiter(c); }
/** * Indicates whether the given character is in the <i>pchar</i> set. * * @see <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986, appendix A</a> */ protected static boolean isPchar(char c) { return isUnreserved(c) || isSubDelimiter(c) || c == ':' || c == '@'; }