img
Method
Description
static boolean isLowSurrogate(char ch)
Returns true if ch contains a valid low
surrogate character.
static boolean
Returns true if cp contains a supplemental
isSupplementar yCodePoint(int cp)
character.
static boolean
Returns true if highCh and lowCh form a valid
isSurrogatePair(char highCh, char lowCh)
surrogate pair.
static boolean isValidCodePoint(int cp)
Returns true if cp contains a valid code point.
static char[ ] toChars(int cp)
Conver ts the code point in cp into its char
equivalent, which might require two chars.
An array holding the result is returned.
static int
Conver ts the code point in cp into its char
toChars(int cp, char target[ ], int loc)
equivalent, storing the result in target, beginning
at loc. Returns 1 if cp can be represented by a
single char. It returns 2 other wise.
Conver ts highCh and lowCh into their equivalent
static int
toCodePoint(char highCh, char lowCh)
code point.
TABLE 16-8
A Sampling of Methods That Provide Suppor t for 32-Bit Unicode Code Points (continued)
Boolean
Boolean is a very thin wrapper around boolean values, which is useful mostly when you
want to pass a boolean variable by reference. It contains the constants TRUE and FALSE,
which define true and false Boolean objects. Boolean also defines the TYPE field, which is
the Class object for boolean. Boolean defines these constructors:
Boolean(boolean boolValue)
Boolean(String boolString)
In the first version, boolValue must be either true or false. In the second version, if boolString
contains the string "true" (in uppercase or lowercase), then the new Boolean object will be
true. Otherwise, it will be false.
Boolean defines the methods shown in Table 16-9.
Method
Description
boolean booleanValue( )
Returns boolean equivalent.
int compareTo(Boolean b)
Returns zero if the invoking object and b contain the
same value. Returns a positive value if the invoking
object is true and b is false. Other wise, returns a
negative value.
boolean equals(Object boolObj)
Returns true if the invoking object is equivalent to
boolObj. Other wise, it returns false.
TABLE 16-9
The Methods Defined by Boolean
Search WWH :
Custom Search
Previous Page
Java SE 6 Topic Index
Next Page
Java SE 6 Bookmarks
Home