Package com.sun.codemodel.util
Class Surrogate
- java.lang.Object
-
- com.sun.codemodel.util.Surrogate
-
class Surrogate extends java.lang.ObjectUtility class for dealing with surrogates.- Version:
- 1.11, 03/01/23
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSurrogate.GeneratorSurrogate generation support.static classSurrogate.ParserSurrogate parsing support.
-
Constructor Summary
Constructors Modifier Constructor Description privateSurrogate()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static charhigh(int uc)Returns the high UTF-16 surrogate for the given UCS-4 character.static booleanis(int c)Tells whether or not the given UTF-16 value is a surrogate character,static booleanisHigh(int c)Tells whether or not the given UTF-16 value is a high surrogate.static booleanisLow(int c)Tells whether or not the given UTF-16 value is a low surrogate.static charlow(int uc)Returns the low UTF-16 surrogate for the given UCS-4 character.static booleanneededFor(int uc)Tells whether or not the given UCS-4 character must be represented as a surrogate pair in UTF-16.static inttoUCS4(char c, char d)Converts the given surrogate pair into a 32-bit UCS-4 character.
-
-
-
Field Detail
-
MIN_HIGH
public static final char MIN_HIGH
- See Also:
- Constant Field Values
-
MAX_HIGH
public static final char MAX_HIGH
- See Also:
- Constant Field Values
-
MIN_LOW
public static final char MIN_LOW
- See Also:
- Constant Field Values
-
MAX_LOW
public static final char MAX_LOW
- See Also:
- Constant Field Values
-
MIN
public static final char MIN
- See Also:
- Constant Field Values
-
MAX
public static final char MAX
- See Also:
- Constant Field Values
-
UCS4_MIN
public static final int UCS4_MIN
- See Also:
- Constant Field Values
-
UCS4_MAX
public static final int UCS4_MAX
- See Also:
- Constant Field Values
-
-
Method Detail
-
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.
-
-