Enum Class TruffleString.CodeRange
- All Implemented Interfaces:
Serializable, Comparable<TruffleString.CodeRange>, Constable
- Enclosing class:
TruffleString
Provides information about a string's content. All values of this enum describe a set of
codepoints potentially contained by a string reporting said value.
- Since:
- 22.1
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAll codepoints in this string are part of the Basic Latin Unicode block, also known as ASCII (0x00 - 0x7f).All codepoints in this string are part of the Unicode Basic Multilingual Plane (BMP) ( 0x0000 - 0xffff).If this code range isprecise
, the string is not encoded correctly (TruffleString.IsValidNode
returnsfalse
), and contains at least one invalid codepoint.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.This string is encoded correctly (TruffleString.IsValidNode
returnstrue
), and if this code range isprecise
, at least one codepoint is outside the largest other applicable code range (e.g. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if this set of potential codepoints is equal to or contained byother
.boolean
Returnstrue
if this set of potential codepoints is equal to or containsother
.static TruffleString.CodeRange
Returns the enum constant of this class with the specified name.static TruffleString.CodeRange[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ASCII
All codepoints in this string are part of the Basic Latin Unicode block, also known as ASCII (0x00 - 0x7f).- Since:
- 22.1
-
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. If this code range isprecise
, at least one codepoint is outside the ASCII range (greater than 0x7f). Applicable toTruffleString.Encoding.ISO_8859_1
,TruffleString.Encoding.UTF_16
andTruffleString.Encoding.UTF_32
only.- Since:
- 22.1
-
BMP
All codepoints in this string are part of the Unicode Basic Multilingual Plane (BMP) ( 0x0000 - 0xffff). If this code range isprecise
, at least one codepoint is outside the LATIN_1 range (greater than 0xff). Applicable toTruffleString.Encoding.UTF_16
andTruffleString.Encoding.UTF_32
only.- Since:
- 22.1
-
VALID
This string is encoded correctly (TruffleString.IsValidNode
returnstrue
), and if this code range isprecise
, at least one codepoint is outside the largest other applicable code range (e.g. greater than 0x7f onTruffleString.Encoding.UTF_8
, greater than 0xffff onTruffleString.Encoding.UTF_16
).- Since:
- 22.1
-
BROKEN
If this code range isprecise
, the string is not encoded correctly (TruffleString.IsValidNode
returnsfalse
), and contains at least one invalid codepoint.Otherwise
, no information about the string is known.- Since:
- 22.1
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
isSubsetOf
Returnstrue
if this set of potential codepoints is equal to or contained byother
.- Since:
- 22.1
-
isSupersetOf
Returnstrue
if this set of potential codepoints is equal to or containsother
.- Since:
- 22.1
-