| Modifier and Type | Field and Description |
|---|---|
| private static final char | |
| private static final char | |
| pack-priv static final char[] | |
| private static final char | ESCAPE
The ESCAPE character is used during run-length encoding. |
| pack-priv static final byte | ESCAPE_BYTE
The ESCAPE_BYTE character is used during run-length encoding. |
| pack-priv static final char[] | |
| public static String | |
| private static final int | |
| private static final char[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static final int | |
| private static final int | |
| public static int | Returns: the resultthe first value x, int the second value y)This implementation is equivalent to Java 8+ Math#addExact(int, int) |
| private static final <T extends Appendable> void | appendEncodedByte(T buffer, byte value, byte[]
A two-element array, with state[0] == 0 if this is the
first byte of a pair, or state[0] != 0 if this is the second byte
of a pair, in which case state[1] is the first byte. state)Append a byte to the given Appendable, packing two bytes into each character. |
| private static final <T extends Appendable> void | |
| public static <T extends Appendable> T | Returns: a reference to resultthe digits of the number are appended here result, int the number to be converted to digits; may be negative.
If negative, a '-' is prepended to the digits. n, int a radix from 2 to 36 inclusive. radix, int the minimum number of digits, not including
any '-', to produce. Values less than 2 have no effect. One
digit is always emitted regardless of this parameter. minDigits)Append a number to the given Appendable in the given radix. |
| public static <A extends Appendable> A | appendTo(CharSequence string, A appendable)
Appends a CharSequence to an Appendable, converting IOException to ICUUncheckedIOException. |
| public static void | appendToRule(StringBuffer
the string to append the character to rule, int the character to append, or (int)-1 if none. c, boolean if true, then the given character should not be
quoted or escaped. Usually this means it is a syntactic element
such as > or $ isLiteral, boolean if true, then unprintable characters
should be escaped using escapeUnprintable(). These escapes will
appear outside of quotes. escapeUnprintable, StringBuffer a buffer which is used to build up quoted
substrings. The caller should initially supply an empty buffer,
and thereafter should not modify the buffer. The buffer should be
cleared out by, at the end, calling this method with a literal
character (which may be -1). quoteBuf)Append a character to a rule that is being built up. |
| public static void | appendToRule(StringBuffer rule, String text, boolean isLiteral, boolean escapeUnprintable, StringBuffer quoteBuf)
Append the given string to the rule. |
| public static void | appendToRule(StringBuffer rule, UnicodeMatcher matcher, boolean escapeUnprintable, StringBuffer quoteBuf)
Given a matcher reference, which may be null, append its pattern as a literal to the given rule. |
| public static final boolean | |
| public static final boolean | arrayEquals(int[] source, Object target)
Convenience utility to compare two int[]s Ought to be in System |
| public static final boolean | arrayEquals(double[] source, Object target)
Convenience utility to compare two double[]s Ought to be in System |
| public static final boolean | |
| public static final boolean | arrayEquals(Object source, Object target)
Convenience utility to compare two Object[]s Ought to be in System |
| public static final boolean | arrayRegionMatches(Object[] source, int sourceStart, Object[] target, int targetStart, int
the length to compare.
The start indices and start+len must be valid. len)Convenience utility to compare two Object[]s Ought to be in System. |
| public static final boolean | arrayRegionMatches(char[] source, int sourceStart, char[] target, int targetStart, int
the length to compare.
The start indices and start+len must be valid. len)Convenience utility to compare two Object[]s Ought to be in System. |
| public static final boolean | arrayRegionMatches(int[] source, int sourceStart, int[] target, int targetStart, int
the length to compare.
The start indices and start+len must be valid.
Ought to be in System len)Convenience utility to compare two int[]s. |
| public static final boolean | arrayRegionMatches(double[] source, int sourceStart, double[] target, int targetStart, int
the length to compare.
The start indices and start+len must be valid.
Ought to be in System len)Convenience utility to compare two arrays of doubles. |
| public static final boolean | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static boolean | charSequenceEquals(CharSequence a, CharSequence b)
Returns whether the chars in the two CharSequences are equal. |
| public static int | charSequenceHashCode(CharSequence value)
Returns a hash code for a CharSequence that is equivalent to calling charSequence.toString().hashCode() |
| public static <T extends Comparable | |
| public static int | |
| private static int | |
| private static int | |
| public static final int | Returns: 0 if equals, 1 if source is greater than target and -1 otherwise32 bit unsigned integer source, int 32 bit unsigned integer target)Compares 2 unsigned integers |
| public static int | |
| private static final <T extends Appendable> void | encodeRun(T buffer, int value, int
The length of the run; must be > 0 && <= 0xFFFF. length)Encode a run, possibly a degenerate run (of < 4 values). |
| private static final <T extends Appendable> void | encodeRun(T buffer, short value, int
The length of the run; must be > 0 && <= 0xFFFF. length)Encode a run, possibly a degenerate run (of < 4 values). |
| private static final <T extends Appendable> void | encodeRun(T buffer, byte value, int
The length of the run; must be > 0 && <= 0xFF. length, byte[] state)Encode a run, possibly a degenerate run (of < 4 values). |
| public static final String | |
| public static <T extends Appendable> T | Returns: resultEscapes one code point using <backslash>uxxxx notation for U+0000 to U+FFFF and <backslash>Uxxxxxxxx for U+10000 and above. |
| public static <T extends Appendable> boolean | escapeUnprintable(T result, int c)
Escapes one unprintable code point using <backslash>uxxxx notation for U+0000 to U+FFFF and <backslash>Uxxxxxxxx for U+10000 and above. |
| public static final String | |
| public static final String | |
| public static String | |
| public static String | |
| pack-priv static final int | |
| public static String | |
| public static String | |
| public static String | |
| public static <S extends CharSequence, U extends CharSequence, T extends Appendable> T | hex(S s, int width, U separator, boolean useCodePoints, T result)
Convert a string to separated groups of hex uppercase digits. |
| public static String | |
| public static <S extends CharSequence> String | hex(S s, int width, S separator)
Convert a string to comma-separated groups of 4 hex uppercase digits. |
| public static final byte | Returns: the bit number of the highest bit, with 0 being the low order bit, or -1 ifn is not positiveis the integer n)Find the highest bit in a positive integer. |
| public static boolean | |
| public static String | Returns: a new String that is composed of the elements separated by the delimiterthe delimiter that separates each element delimiter, Iterable<? extends CharSequence> the elements to join together. elements)Java 8+ |
| public static int | |
| public static int | |
| public static boolean | Returns: true if 'ch' is seen preceded by zero or more whitespace characters.the string to be parsed id, int[] INPUT-OUTPUT parameter. On input, pos[0] is the
offset of the first character to be parsed. On output, pos[0]
is the index after the last parsed character. If the parse
fails, pos[0] will be unchanged. pos, char the non-whitespace character to be parsed. ch)Parse a single non-whitespace character 'ch', optionally preceded by whitespace. |
| public static int | parseInteger(String rule, int[]
INPUT-OUTPUT parameter. On input, the first
character to parse. On output, the character after the last
parsed character. pos, int limit)Parse an integer at pos, either of the form \d+ or of the form 0x[0-9A-Fa-f]+ or 0[0-7]+, that is, in standard decimal, hex, or octal format. |
| public static int | Returns: a non-negative parsed number, or -1 upon parse failure. Parse fails if there are no digits, that is, if pos[0] does not point to a valid digit on entry, or if the number to be parsed does not fit into a 31-bit unsigned integer.the text to be parsed text, int[] INPUT-OUTPUT parameter. On entry, pos[0] is the
offset within text at which to start parsing; it should point
to a valid digit. On exit, pos[0] is the offset after the last
parsed character. If the parse failed, it will be unchanged on
exit. Must be >= 0 on entry. pos, int the radix in which to parse; must be >= 2 and <=
36. radix)Parse an unsigned 31-bit integer at the given offset. |
| public static int | Returns: the position after the last character parsed, or -1 if the parse failedmust only contain lowercase characters, which
will match their uppercase equivalents as well. A space
character matches one or more required spaces. A '~' character
matches zero or more optional spaces. A '#' character matches
an integer and stores it in parsedInts, which the caller must
ensure has enough capacity. pattern, int[] array to receive parsed integers. Caller
must ensure that parsedInts.length is >= the number of '#'
signs in 'pattern'. parsedInts)Parse a pattern string starting at offset pos. |
| public static int | Returns: index after last parsed character, or -1 on parse failure.pattern that controls parsing pat, Replaceable text to be parsed, starting at index text, int offset to first character to parse index, int offset after last character to parse limit)Parse a pattern string within the given Replaceable and a parsing pattern. |
| public static String | Returns: the Unicode identifier, or null if there is no valid identifier at pos[0].the string to parse str, int[] INPUT-OUTPUT parameter. On INPUT, pos[0] is the
first character to examine. It must be less than str.length(),
and it must not point to a whitespace character. That is, must
have pos[0] < str.length(). On
OUTPUT, the position after the last parsed character. pos)Parse a Unicode identifier from the given string at the given position. |
| public static int | Returns: Offset of the first character insetOfChars
found, or -1 if not found.text to be searched text, int the beginning index, inclusive; start, int 0 <= start
<= limit.the ending index, exclusive; limit, String start <= limit
<= text.length().string with one or more distinct characters setOfChars)Returns the index of the first character in a set, ignoring quoted text. |
| private static <T extends Appendable> void | recursiveAppendNumber(T
is the result, int Appendable to append tois the positive integer n, int is the radix, from 2 to 36 inclusive radix, int is the minimum number of digits to append. minDigits)Append the digits of a positive integer to the given
|
| public static String | |
| public static final byte[] | |
| public static final char[] | |
| public static final int[] | |
| public static final short[] | |
| public static final boolean | |
| public static boolean | Returns: true for control codes and for surrogate and noncharacter code points
|
| public static void | split(String
the string to split s, char the character on which to split. Occurrences of
this character are not included in the output divider, String[] an array to receive the substrings between
instances of divider. It must be large enough on entry to
accommodate all output. Adjacent instances of the divider
character will place empty strings into output. Before
returning, output is padded out with empty strings. output)Split a string into pieces based on the given divider character |
| public static String[] | Returns: output an array to receive the substrings between instances of divider. Adjacent instances of the divider character will place empty strings into output.the string to split s, char the character on which to split. Occurrences of
this character are not included in the output divider)Split a string into pieces based on the given divider character |
| public static String[] | |
| public static String[] | |
| public static String | |
| public static int | Returns: the code point and length, or -1 on error.the offset to the character after the backslash. offset)Converts an escape to a code point value. |
| private static int | |
| public static String | |
| public static String | valueOf(int[] source)
Utility method to take a int[] containing codepoints and return a string representation with code units. |