java.lang.Object
org.apache.jena.rfc3986.Chars3986
Characters and character classes
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charEnd of file/string marker - this is not a valid Unicode codepoint. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic charcharAt(CharSequence str, int x) String.charAt except with an EOF character, not an exception.static StringdisplayChar(char ch) Return a display string for a character suitable for error messages.static booleangenDelims(char ch) RFC 3986 : gen-delims / sub-delimsstatic inthexValue(char ch) static booleanint_isIPrivate(int ch) static booleanint_isUcsChar(int ch) static booleanisAlpha(char ch) static booleanisAlphaNum(char ch) static booleanisDigit(char ch) static booleanisHexDigit(char ch) HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"but also lower case (non-normalized form).static booleanisHexDigitUC(char ch) Test for 'A' to 'F'static booleanisIAlpha(char ch) RFC3987: International alphabetic.static booleanRFC3987 ipcharstatic booleanisIPrivate(char ch) static booleanisPChar(char ch, CharSequence str, int posn) Test whetherchis an RFC3986 pchar.static booleanisPctEncoded(char ch, CharSequence s, int x) Test whether the character at location 'x' is percent-encoded.static booleanisUcsChar(char ch) static booleaniunreserved(char ch) RFC 3987 : iunreservedstatic booleanpercentCheck(char ch1, char ch2, CharSequence source, int idx) Check whetherch1andch2are percent-encoding hex characters.static booleanrange(int ch, int start, int finish) Test whether a character is in a character range (both ends inclusive)static booleansubDelims(char ch) RFC 3986 : sub-delimsstatic booleanunreserved(char ch) RFC 3986 : unreserved
-
Field Details
-
EOF
public static final char EOFEnd of file/string marker - this is not a valid Unicode codepoint.- See Also:
-
-
Constructor Details
-
Chars3986
public Chars3986()
-
-
Method Details
-
isPChar
Test whetherchis an RFC3986 pchar. This may need to look ahead in the string if the character is a%. -
isIPChar
RFC3987 ipchar -
isPctEncoded
Test whether the character at location 'x' is percent-encoded. This operation needs to look at next two characters if and only if ch is '%'.This function looks ahead 2 characters which will be parsed but likely they are in the L1 or L2 cache and the alternative is more complex logic (return the new character position in some way).
-
isAlpha
public static boolean isAlpha(char ch) -
isAlphaNum
public static boolean isAlphaNum(char ch) -
isIAlpha
public static boolean isIAlpha(char ch) RFC3987: International alphabetic. -
isUcsChar
public static boolean isUcsChar(char ch) -
int_isUcsChar
public static boolean int_isUcsChar(int ch) -
isIPrivate
public static boolean isIPrivate(char ch) -
int_isIPrivate
public static boolean int_isIPrivate(int ch) -
unreserved
public static boolean unreserved(char ch) RFC 3986 : unreserved -
iunreserved
public static boolean iunreserved(char ch) RFC 3987 : iunreserved -
subDelims
public static boolean subDelims(char ch) RFC 3986 : sub-delims -
genDelims
public static boolean genDelims(char ch) RFC 3986 : gen-delims / sub-delims -
displayChar
Return a display string for a character suitable for error messages. -
percentCheck
Check whetherch1andch2are percent-encoding hex characters. -
charAt
String.charAt except with an EOF character, not an exception. -
range
public static boolean range(int ch, int start, int finish) Test whether a character is in a character range (both ends inclusive) -
isDigit
public static boolean isDigit(char ch) -
isHexDigit
public static boolean isHexDigit(char ch) HEXDIG = DIGIT / "A" / "B" / "C" / "D" / "E" / "F"but also lower case (non-normalized form). See RFC 3986 sec 6.2.2.1 -
hexValue
public static int hexValue(char ch) -
isHexDigitUC
public static boolean isHexDigitUC(char ch) Test for 'A' to 'F'
-