Package com.ibm.icu.util
Enum CodePointMap.RangeOption
- All Implemented Interfaces:
Serializable
,Comparable<CodePointMap.RangeOption>
,java.lang.constant.Constable
- Enclosing class:
CodePointMap
Selectors for how getRange() should report value ranges overlapping with surrogates.
Most users should use NORMAL.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptiongetRange() enumerates all same-value ranges as stored in the map, except that all surrogates (U+D800..U+DFFF) are treated as having the surrogateValue, which is passed to getRange() as a separate parameter.getRange() enumerates all same-value ranges as stored in the map, except that lead surrogates (U+D800..U+DBFF) are treated as having the surrogateValue, which is passed to getRange() as a separate parameter.getRange() enumerates all same-value ranges as stored in the map. -
Method Summary
Modifier and TypeMethodDescriptionstatic CodePointMap.RangeOption
Returns the enum constant of this type with the specified name.static CodePointMap.RangeOption[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
NORMAL
getRange() enumerates all same-value ranges as stored in the map. Most users should use this option. -
FIXED_LEAD_SURROGATES
getRange() enumerates all same-value ranges as stored in the map, except that lead surrogates (U+D800..U+DBFF) are treated as having the surrogateValue, which is passed to getRange() as a separate parameter. The surrogateValue is not transformed via filter(). SeeCharacter.isHighSurrogate(char)
.Most users should use NORMAL instead.
This option is useful for maps that map surrogate code units to special values optimized for UTF-16 string processing or for special error behavior for unpaired surrogates, but those values are not to be associated with the lead surrogate code points.
-
FIXED_ALL_SURROGATES
getRange() enumerates all same-value ranges as stored in the map, except that all surrogates (U+D800..U+DFFF) are treated as having the surrogateValue, which is passed to getRange() as a separate parameter. The surrogateValue is not transformed via filter(). SeeCharacter.isSurrogate(char)
.Most users should use NORMAL instead.
This option is useful for maps that map surrogate code units to special values optimized for UTF-16 string processing or for special error behavior for unpaired surrogates, but those values are not to be associated with the lead surrogate code points.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-