Package com.sun.codemodel.util
Class Surrogate
java.lang.Object
com.sun.codemodel.util.Surrogate
Utility class for dealing with surrogates.
- Version:
- 1.11, 03/01/23
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Surrogate generation support.static class
Surrogate parsing support. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic char
high
(int uc) Returns the high UTF-16 surrogate for the given UCS-4 character.static boolean
is
(int c) Tells whether or not the given UTF-16 value is a surrogate character,static boolean
isHigh
(int c) Tells whether or not the given UTF-16 value is a high surrogate.static boolean
isLow
(int c) Tells whether or not the given UTF-16 value is a low surrogate.static char
low
(int uc) Returns the low UTF-16 surrogate for the given UCS-4 character.static boolean
neededFor
(int uc) Tells whether or not the given UCS-4 character must be represented as a surrogate pair in UTF-16.static int
toUCS4
(char c, char d) Converts the given surrogate pair into a 32-bit UCS-4 character.
-
Field Details
-
MIN_HIGH
public static final char MIN_HIGH- See Also:
-
MAX_HIGH
public static final char MAX_HIGH- See Also:
-
MIN_LOW
public static final char MIN_LOW- See Also:
-
MAX_LOW
public static final char MAX_LOW- See Also:
-
MIN
public static final char MIN- See Also:
-
MAX
public static final char MAX- See Also:
-
UCS4_MIN
public static final int UCS4_MIN- See Also:
-
UCS4_MAX
public static final int UCS4_MAX- See Also:
-
-
Constructor Details
-
Surrogate
private Surrogate()
-
-
Method Details
-
isHigh
public static boolean isHigh(int c) Tells whether or not the given UTF-16 value is a high surrogate. -
isLow
public static boolean isLow(int c) Tells whether or not the given UTF-16 value is a low surrogate. -
is
public static boolean is(int c) Tells whether or not the given UTF-16 value is a surrogate character, -
neededFor
public static boolean neededFor(int uc) Tells whether or not the given UCS-4 character must be represented as a surrogate pair in UTF-16. -
high
public static char high(int uc) Returns the high UTF-16 surrogate for the given UCS-4 character. -
low
public static char low(int uc) Returns the low UTF-16 surrogate for the given UCS-4 character. -
toUCS4
public static int toUCS4(char c, char d) Converts the given surrogate pair into a 32-bit UCS-4 character.
-