public static enum TruffleString.CompactionLevel extends Enum<TruffleString.CompactionLevel>
TruffleString.Encoding.UTF_16
and TruffleString.Encoding.UTF_32
, since
TruffleString doesn't support string compaction on any other encoding.Enum.EnumDesc<E extends Enum<E>>
Enum Constant and Description |
---|
S1
One byte per array element.
|
S2
Two bytes per array element.
|
S4
Four bytes per array element.
|
Modifier and Type | Method and Description |
---|---|
int |
getBytes()
Get the number of bytes per internal array element.
|
int |
getLog2()
Get the number of bytes per internal array element in log2 format.
|
static TruffleString.CompactionLevel |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TruffleString.CompactionLevel[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TruffleString.CompactionLevel S1
public static final TruffleString.CompactionLevel S2
public static final TruffleString.CompactionLevel S4
public static TruffleString.CompactionLevel[] values()
public static TruffleString.CompactionLevel 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 final int getBytes()
public final int getLog2()