Elide GraalVM25.6.0-elide.4
All types
Versions and modules

TruffleString.CodeRange

Javaenum classin com.oracle.truffle.api.stringssince 22.1

public enum TruffleString.CodeRange
Inheritance
  1. Object
  2. Enum
  3. CodeRange
Enclosing type
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.

Enum constants5

ASCII

ASCII

since 22.1
ASCII

All codepoints in this string are part of the Basic Latin Unicode block, also known as ASCII (0x00 - 0x7f).

LATIN_1

LATIN_1

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 is precise, at least one codepoint is outside the ASCII range (greater than 0x7f). Applicable to Encoding.ISO_8859_1, Encoding.UTF_16 and Encoding.UTF_32 only.

BMP

BMP

since 22.1
BMP

All codepoints in this string are part of the Unicode Basic Multilingual Plane (BMP) ( 0x0000 - 0xffff). If this code range is precise, at least one codepoint is outside the LATIN_1 range (greater than 0xff). Applicable to Encoding.UTF_16 and Encoding.UTF_32 only.

VALID

VALID

since 22.1
VALID

This string is encoded correctly (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 Encoding.UTF_8, greater than 0xffff on Encoding.UTF_16).

BROKEN

BROKEN

since 22.1
BROKEN

If this code range is precise, the string is not encoded correctly (IsValidNode returns false), and contains at least one invalid codepoint. Otherwise, no information about the string is known.

Methods4

static TruffleString.CodeRange[] values()

values

static
public static TruffleString.CodeRange[] values()

Returns the enum constants in declaration order.

Returns

TruffleString.CodeRange[]
Returns the enum constants in declaration order.
static TruffleString.CodeRange valueOf(String)

valueOf

static
public static TruffleString.CodeRange valueOf(String name)

Returns the enum constant with the given name.

Parameters

nameString
The exact name of the enum constant.

Returns

TruffleString.CodeRange
Returns the enum constant with the given name.
boolean isSubsetOf(TruffleString.CodeRange)

isSubsetOf

since 22.1
public boolean isSubsetOf(TruffleString.CodeRange other)

Returns true if this set of potential codepoints is equal to or contained by other.

Parameters

otherTruffleString.CodeRange
No description.

Returns

boolean
No description.
boolean isSupersetOf(TruffleString.CodeRange)

isSupersetOf

since 22.1
public boolean isSupersetOf(TruffleString.CodeRange other)

Returns true if this set of potential codepoints is equal to or contains other.

Parameters

otherTruffleString.CodeRange
No description.

Returns

boolean
No description.

Inherited members