APIdia Launch Partner
Top Fields Constructors Methods
jdk.internal.util.regex

public final Class Grapheme

extends Object
Class Inheritance
Imports
java.util.Objects

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
L

private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final int
private static final boolean[][]
private static final int
private static final int
private static final int
private static final int
T

private static final int
private static final int
V

private static final int
private static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static int

Returns:

the advance in index if the indic conjunct break sequence is found, it will be negative if the sequence is not found
checkIndicConjunctBreak
(CharSequence
the source char sequence
src
,
int
the index that points to the starting Linking Consonant
index
,
int
limit to the char sequence
limit
)

Checks for a possible GB9c Indic Conjunct Break sequence.

pack-priv static int
getType(int cp)

pack-priv static boolean
public static int

Returns:

the next grapheme boundary
nextBoundary
(CharSequence
the CharSequence to be scanned
src
,
int
offset to start looking for the next boundary in the src
off
,
int
limit offset in the src (exclusive)
limit
)

Look for the next extended grapheme cluster boundary in a CharSequence.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CONTROLback to summary
private static final int CONTROL
CRback to summary
private static final int CR
EXTENDback to summary
private static final int EXTEND
EXTENDED_PICTOGRAPHICback to summary
private static final int EXTENDED_PICTOGRAPHIC
FIRST_TYPEback to summary
private static final int FIRST_TYPE
Lback to summary
private static final int L
LAST_TYPEback to summary
private static final int LAST_TYPE
LCOUNTback to summary
private static final int LCOUNT
LFback to summary
private static final int LF
LVback to summary
private static final int LV
LVTback to summary
private static final int LVT
NCOUNTback to summary
private static final int NCOUNT
OTHERback to summary
private static final int OTHER
PREPENDback to summary
private static final int PREPEND
RIback to summary
private static final int RI
rulesback to summary
private static final boolean[][] rules
SCOUNTback to summary
private static final int SCOUNT
SPACINGMARKback to summary
private static final int SPACINGMARK
SYLLABLE_BASEback to summary
private static final int SYLLABLE_BASE
Tback to summary
private static final int T
TCOUNTback to summary
private static final int TCOUNT
Vback to summary
private static final int V
VCOUNTback to summary
private static final int VCOUNT
ZWJback to summary
private static final int ZWJ

Constructor Detail

Graphemeback to summary
public Grapheme()

Method Detail

checkIndicConjunctBreakback to summary
private static int checkIndicConjunctBreak(CharSequence src, int index, int limit)

Checks for a possible GB9c Indic Conjunct Break sequence. If it is repetitive, e.g., Consonant1/Linker1/Consonant2/Linker2/Consonant3, only the first part of the sequence (Consonant1/Linker1/Consonant2) is recognized. The rest is analyzed in the next iteration of the grapheme cluster boundary search.

Parameters
src:CharSequence

the source char sequence

index:int

the index that points to the starting Linking Consonant

limit:int

limit to the char sequence

Returns:int

the advance in index if the indic conjunct break sequence is found, it will be negative if the sequence is not found

getTypeback to summary
pack-priv static int getType(int cp)
Annotations
@SuppressWarnings:fallthrough
isExcludedSpacingMarkback to summary
pack-priv static boolean isExcludedSpacingMark(int cp)
nextBoundaryback to summary
public static int nextBoundary(CharSequence src, int off, int limit)

Look for the next extended grapheme cluster boundary in a CharSequence. It assumes the start of the char sequence at offset off is a boundary.

See Unicode Standard Annex #29 Unicode Text Segmentation for the specification for the extended grapheme cluster boundary rules. The following implementation is based on the annex for Unicode version 17.0.

Parameters
src:CharSequence

the CharSequence to be scanned

off:int

offset to start looking for the next boundary in the src

limit:int

limit offset in the src (exclusive)

Returns:int

the next grapheme boundary

External Specification
https://docs.oracle.com/en/java/javase/27/docs/http://www.unicode.org/reports/tr29/tr29-47.html