public static enum TruffleString.CodeRange extends Enum<TruffleString.CodeRange>
Enum.EnumDesc<E extends Enum<E>>
Enum Constant and Description |
---|
ASCII
All codepoints in this string are part of the Basic Latin Unicode block, also known as
ASCII (0x00 - 0x7f).
|
BMP
All codepoints in this string are part of the Unicode Basic Multilingual Plane (BMP) (
0x0000 - 0xffff).
|
BROKEN
If this code range is
precise , the string is not encoded
correctly (TruffleString.IsValidNode returns false ), and contains at least one invalid
codepoint. |
LATIN_1
All codepoints in this string are part of the ISO-8859-1 character set (0x00 - 0xff),
which is equivalent to the union of the Basic Latin and the Latin-1 Supplement Unicode
block.
|
VALID
This string is encoded correctly (
TruffleString.IsValidNode returns true ), and if this
code range is precise , at least one codepoint is outside the
largest other applicable code range (e.g. |
Modifier and Type | Method and Description |
---|---|
boolean |
isSubsetOf(TruffleString.CodeRange other)
Returns
true if this set of potential codepoints is equal to or contained by
other . |
boolean |
isSupersetOf(TruffleString.CodeRange other)
Returns
true if this set of potential codepoints is equal to or contains
other . |
static TruffleString.CodeRange |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TruffleString.CodeRange[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TruffleString.CodeRange ASCII
public static final TruffleString.CodeRange LATIN_1
precise
, at least one codepoint is
outside the ASCII range (greater than 0x7f). Applicable to TruffleString.Encoding.ISO_8859_1
,
TruffleString.Encoding.UTF_16
and TruffleString.Encoding.UTF_32
only.public static final TruffleString.CodeRange BMP
precise
, at least one
codepoint is outside the LATIN_1 range (greater than 0xff). Applicable to
TruffleString.Encoding.UTF_16
and TruffleString.Encoding.UTF_32
only.public static final TruffleString.CodeRange VALID
TruffleString.IsValidNode
returns true
), and if this
code range is precise
, at least one codepoint is outside the
largest other applicable code range (e.g. greater than 0x7f on TruffleString.Encoding.UTF_8
,
greater than 0xffff on TruffleString.Encoding.UTF_16
).public static final TruffleString.CodeRange BROKEN
precise
, the string is not encoded
correctly (TruffleString.IsValidNode
returns false
), and contains at least one invalid
codepoint. Otherwise
, no information about the string
is known.public static TruffleString.CodeRange[] values()
public static TruffleString.CodeRange valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic boolean isSubsetOf(TruffleString.CodeRange other)
true
if this set of potential codepoints is equal to or contained by
other
.public boolean isSupersetOf(TruffleString.CodeRange other)
true
if this set of potential codepoints is equal to or contains
other
.