A family of character subsets representing the character blocks in the Unicode specification. Character blocks generally define characters used for a specific script or purpose. A character is contained by at most one Unicode block.
@since
1.2
Constant for the "Aegean Numbers" Unicode character block.
@since
1.5
Constant for the "Alphabetic Presentation Forms" Unicode character block.
@since
1.2
Constant for the "Arabic" Unicode character block.
@since
1.2
Constant for the "Arabic Presentation Forms-A" Unicode character block.
@since
1.2
Constant for the "Arabic Presentation Forms-B" Unicode character block.
@since
1.2
Constant for the "Armenian" Unicode character block.
@since
1.2
Constant for the "Arrows" Unicode character block.
@since
1.2
Constant for the "Basic Latin" Unicode character block.
@since
1.2
Constant for the "Bengali" Unicode character block.
@since
1.2
Constant for the "Block Elements" Unicode character block.
@since
1.2
Constant for the "Bopomofo" Unicode character block.
@since
1.2
Constant for the "Bopomofo Extended" Unicode character block.
@since
1.4
Constant for the "Box Drawing" Unicode character block.
@since
1.2
Constant for the "Braille Patterns" Unicode character block.
@since
1.4
Constant for the "Buhid" Unicode character block.
@since
1.5
Constant for the "Byzantine Musical Symbols" Unicode character block.
@since
1.5
Constant for the "Cherokee" Unicode character block.
@since
1.4
Constant for the "CJK Compatibility" Unicode character block.
@since
1.2
Constant for the "CJK Compatibility Forms" Unicode character block.
@since
1.2
Constant for the "CJK Compatibility Ideographs" Unicode character block.
@since
1.2
Constant for the "CJK Compatibility Ideographs Supplement" Unicode character block.
@since
1.5
Constant for the "CJK Radicals Supplement" Unicode character block.
@since
1.4
Constant for the "CJK Symbols and Punctuation" Unicode character block.
@since
1.2
Constant for the "CJK Unified Ideographs" Unicode character block.
@since
1.2
Constant for the "CJK Unified Ideographs Extension A" Unicode character block.
@since
1.4
Constant for the "CJK Unified Ideographs Extension B" Unicode character block.
@since
1.5
Constant for the "Combining Diacritical Marks" Unicode character block.
@since
1.2
Constant for the "Combining Half Marks" Unicode character block.
@since
1.2
Constant for the "Combining Diacritical Marks for Symbols" Unicode character block.

This block was previously known as "Combining Marks for Symbols".

@since
1.2
Constant for the "Control Pictures" Unicode character block.
@since
1.2
Constant for the "Currency Symbols" Unicode character block.
@since
1.2
Constant for the "Cypriot Syllabary" Unicode character block.
@since
1.5
Constant for the "Cyrillic" Unicode character block.
@since
1.2
Constant for the "Cyrillic Supplementary" Unicode character block.
@since
1.5
Constant for the "Deseret" Unicode character block.
@since
1.5
Constant for the "Devanagari" Unicode character block.
@since
1.2
Constant for the "Dingbats" Unicode character block.
@since
1.2
Constant for the "Enclosed Alphanumerics" Unicode character block.
@since
1.2
Constant for the "Enclosed CJK Letters and Months" Unicode character block.
@since
1.2
Constant for the "Ethiopic" Unicode character block.
@since
1.4
Constant for the "General Punctuation" Unicode character block.
@since
1.2
Constant for the "Geometric Shapes" Unicode character block.
@since
1.2
Constant for the "Georgian" Unicode character block.
@since
1.2
Constant for the "Gothic" Unicode character block.
@since
1.5
Constant for the "Greek and Coptic" Unicode character block.

This block was previously known as the "Greek" block.

@since
1.2
Constant for the "Greek Extended" Unicode character block.
@since
1.2
Constant for the "Gujarati" Unicode character block.
@since
1.2
Constant for the "Gurmukhi" Unicode character block.
@since
1.2
Constant for the "Halfwidth and Fullwidth Forms" Unicode character block.
@since
1.2
Constant for the "Hangul Compatibility Jamo" Unicode character block.
@since
1.2
Constant for the "Hangul Jamo" Unicode character block.
@since
1.2
Constant for the "Hangul Syllables" Unicode character block.
@since
1.2
Constant for the "Hanunoo" Unicode character block.
@since
1.5
Constant for the "Hebrew" Unicode character block.
@since
1.2
Constant for the "High Private Use Surrogates" Unicode character block. This block represents codepoint values in the high surrogate range: 0xDB80 through 0xDBFF
@since
1.5
Constant for the "High Surrogates" Unicode character block. This block represents codepoint values in the high surrogate range: 0xD800 through 0xDB7F
@since
1.5
Constant for the "Hiragana" Unicode character block.
@since
1.2
Constant for the "Ideographic Description Characters" Unicode character block.
@since
1.4
Constant for the "IPA Extensions" Unicode character block.
@since
1.2
Constant for the "Kanbun" Unicode character block.
@since
1.2
Constant for the "Kangxi Radicals" Unicode character block.
@since
1.4
Constant for the "Kannada" Unicode character block.
@since
1.2
Constant for the "Katakana" Unicode character block.
@since
1.2
Constant for the "Katakana Phonetic Extensions" Unicode character block.
@since
1.5
Constant for the "Khmer" Unicode character block.
@since
1.4
Constant for the "Khmer Symbols" Unicode character block.
@since
1.5
Constant for the "Lao" Unicode character block.
@since
1.2
Constant for the "Latin-1 Supplement" Unicode character block.
@since
1.2
Constant for the "Latin Extended-A" Unicode character block.
@since
1.2
Constant for the "Latin Extended Additional" Unicode character block.
@since
1.2
Constant for the "Latin Extended-B" Unicode character block.
@since
1.2
Constant for the "Letterlike Symbols" Unicode character block.
@since
1.2
Constant for the "Limbu" Unicode character block.
@since
1.5
Constant for the "Linear B Ideograms" Unicode character block.
@since
1.5
Constant for the "Linear B Syllabary" Unicode character block.
@since
1.5
Constant for the "Low Surrogates" Unicode character block. This block represents codepoint values in the high surrogate range: 0xDC00 through 0xDFFF
@since
1.5
Constant for the "Malayalam" Unicode character block.
@since
1.2
Constant for the "Mathematical Alphanumeric Symbols" Unicode character block.
@since
1.5
Constant for the "Mathematical Operators" Unicode character block.
@since
1.2
Constant for the "Miscellaneous Mathematical Symbols-A" Unicode character block.
@since
1.5
Constant for the "Miscellaneous Mathematical Symbols-B" Unicode character block.
@since
1.5
Constant for the "Miscellaneous Symbols" Unicode character block.
@since
1.2
Constant for the "Miscellaneous Symbols and Arrows" Unicode character block.
@since
1.5
Constant for the "Miscellaneous Technical" Unicode character block.
@since
1.2
Constant for the "Mongolian" Unicode character block.
@since
1.4
Constant for the "Musical Symbols" Unicode character block.
@since
1.5
Constant for the "Myanmar" Unicode character block.
@since
1.4
Constant for the "Number Forms" Unicode character block.
@since
1.2
Constant for the "Ogham" Unicode character block.
@since
1.4
Constant for the "Old Italic" Unicode character block.
@since
1.5
Constant for the "Optical Character Recognition" Unicode character block.
@since
1.2
Constant for the "Oriya" Unicode character block.
@since
1.2
Constant for the "Osmanya" Unicode character block.
@since
1.5
Constant for the "Phonetic Extensions" Unicode character block.
@since
1.5
Constant for the "Private Use Area" Unicode character block.
@since
1.2
Constant for the "Runic" Unicode character block.
@since
1.4
Constant for the "Shavian" Unicode character block.
@since
1.5
Constant for the "Sinhala" Unicode character block.
@since
1.4
Constant for the "Small Form Variants" Unicode character block.
@since
1.2
Constant for the "Spacing Modifier Letters" Unicode character block.
@since
1.2
Constant for the "Specials" Unicode character block.
@since
1.2
Constant for the "Superscripts and Subscripts" Unicode character block.
@since
1.2
Constant for the "Supplemental Arrows-A" Unicode character block.
@since
1.5
Constant for the "Supplemental Arrows-B" Unicode character block.
@since
1.5
Constant for the "Supplemental Mathematical Operators" Unicode character block.
@since
1.5
Constant for the "Supplementary Private Use Area-A" Unicode character block.
@since
1.5
Constant for the "Supplementary Private Use Area-B" Unicode character block.
@since
1.5
@deprecated
As of J2SE 5, use {@link #HIGH_SURROGATES}, {@link #HIGH_PRIVATE_USE_SURROGATES}, and {@link #LOW_SURROGATES}. These new constants match the block definitions of the Unicode Standard. The {@link #of(char)} and {@link #of(int)} methods return the new constants, not SURROGATES_AREA.
Constant for the "Syriac" Unicode character block.
@since
1.4
Constant for the "Tagalog" Unicode character block.
@since
1.5
Constant for the "Tagbanwa" Unicode character block.
@since
1.5
Constant for the "Tags" Unicode character block.
@since
1.5
Constant for the "Tai Le" Unicode character block.
@since
1.5
Constant for the "Tai Xuan Jing Symbols" Unicode character block.
@since
1.5
Constant for the "Tamil" Unicode character block.
@since
1.2
Constant for the "Telugu" Unicode character block.
@since
1.2
Constant for the "Thaana" Unicode character block.
@since
1.4
Constant for the "Thai" Unicode character block.
@since
1.2
Constant for the "Tibetan" Unicode character block.
@since
1.2
Constant for the "Ugaritic" Unicode character block.
@since
1.5
Constant for the "Unified Canadian Aboriginal Syllabics" Unicode character block.
@since
1.4
Constant for the "Variation Selectors" Unicode character block.
@since
1.5
Constant for the "Variation Selectors Supplement" Unicode character block.
@since
1.5
Constant for the "Yi Radicals" Unicode character block.
@since
1.4
Constant for the "Yi Syllables" Unicode character block.
@since
1.4
Constant for the "Yijing Hexagram Symbols" Unicode character block.
@since
1.5
Compares two Subset objects for equality. This method returns true if and only if this and the argument refer to the same object; since this method is final, this guarantee holds for all subclasses.
Returns the UnicodeBlock with the given name. Block names are determined by The Unicode Standard. The file Blocks-<version>.txt defines blocks for a particular version of the standard. The Character class specifies the version of the standard that it supports.

This method accepts block names in the following forms:

  1. Canonical block names as defined by the Unicode Standard. For example, the standard defines a "Basic Latin" block. Therefore, this method accepts "Basic Latin" as a valid block name. The documentation of each UnicodeBlock provides the canonical name.
  2. Canonical block names with all spaces removed. For example, "BasicLatin" is a valid block name for the "Basic Latin" block.
  3. The text representation of each constant UnicodeBlock identifier. For example, this method will return the #BASIC_LATIN block if provided with the "BASIC_LATIN" name. This form replaces all spaces and hyphens in the canonical name with underscores.
Finally, character case is ignored for all of the valid block name forms. For example, "BASIC_LATIN" and "basic_latin" are both valid block names. The en_US locale's case mapping rules are used to provide case-insensitive string comparisons for block name validation.

If the Unicode Standard changes block names, both the previous and current names will be accepted.

Parameters
blockNameA UnicodeBlock name.
Return
The UnicodeBlock instance identified by blockName
Throws
IllegalArgumentExceptionif blockName is an invalid name
NullPointerExceptionif blockName is null
@since
1.5
Returns the runtime class of an object. That Class object is the object that is locked by static synchronized methods of the represented class.
Return
The java.lang.Class object that represents the runtime class of the object. The result is of type {@code Class} where X is the erasure of the static type of the expression on which getClass is called.
Returns the standard hash code as defined by the Object#hashCode method. This method is final in order to ensure that the equals and hashCode methods will be consistent in all subclasses.
Wakes up a single thread that is waiting on this object's monitor. If any threads are waiting on this object, one of them is chosen to be awakened. The choice is arbitrary and occurs at the discretion of the implementation. A thread waits on an object's monitor by calling one of the wait methods.

The awakened thread will not be able to proceed until the current thread relinquishes the lock on this object. The awakened thread will compete in the usual manner with any other threads that might be actively competing to synchronize on this object; for example, the awakened thread enjoys no reliable privilege or disadvantage in being the next thread to lock this object.

This method should only be called by a thread that is the owner of this object's monitor. A thread becomes the owner of the object's monitor in one of three ways:

  • By executing a synchronized instance method of that object.
  • By executing the body of a synchronized statement that synchronizes on the object.
  • For objects of type Class, by executing a synchronized static method of that class.

Only one thread at a time can own an object's monitor.

Throws
IllegalMonitorStateExceptionif the current thread is not the owner of this object's monitor.
Wakes up all threads that are waiting on this object's monitor. A thread waits on an object's monitor by calling one of the wait methods.

The awakened threads will not be able to proceed until the current thread relinquishes the lock on this object. The awakened threads will compete in the usual manner with any other threads that might be actively competing to synchronize on this object; for example, the awakened threads enjoy no reliable privilege or disadvantage in being the next thread to lock this object.

This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.

Throws
IllegalMonitorStateExceptionif the current thread is not the owner of this object's monitor.
Returns the object representing the Unicode block containing the given character, or null if the character is not a member of a defined block.

Note: This method cannot handle supplementary characters. To support all Unicode characters, including supplementary characters, use the method.

Parameters
cThe character in question
Return
The UnicodeBlock instance representing the Unicode block of which this character is a member, or null if the character is not a member of any Unicode block
Returns the object representing the Unicode block containing the given character (Unicode code point), or null if the character is not a member of a defined block.
Parameters
codePointthe character (Unicode code point) in question.
Return
The UnicodeBlock instance representing the Unicode block of which this character is a member, or null if the character is not a member of any Unicode block
Throws
IllegalArgumentExceptionif the specified codePoint is an invalid Unicode code point.
@since
1.5
Returns the name of this subset.
Causes current thread to wait until another thread invokes the method or the method for this object. In other words, this method behaves exactly as if it simply performs the call wait(0).

The current thread must own this object's monitor. The thread releases ownership of this monitor and waits until another thread notifies threads waiting on this object's monitor to wake up either through a call to the notify method or the notifyAll method. The thread then waits until it can re-obtain ownership of the monitor and resumes execution.

As in the one argument version, interrupts and spurious wakeups are possible, and this method should always be used in a loop:

     synchronized (obj) {
         while (<condition does not hold>)
             obj.wait();
         ... // Perform action appropriate to condition
     }
 
This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.
Throws
IllegalMonitorStateExceptionif the current thread is not the owner of the object's monitor.
InterruptedExceptionif another thread interrupted the current thread before or while the current thread was waiting for a notification. The interrupted status of the current thread is cleared when this exception is thrown.
Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.

The current thread must own this object's monitor.

This method causes the current thread (call it T) to place itself in the wait set for this object and then to relinquish any and all synchronization claims on this object. Thread T becomes disabled for thread scheduling purposes and lies dormant until one of four things happens:

  • Some other thread invokes the notify method for this object and thread T happens to be arbitrarily chosen as the thread to be awakened.
  • Some other thread invokes the notifyAll method for this object.
  • Some other thread interrupts thread T.
  • The specified amount of real time has elapsed, more or less. If timeout is zero, however, then real time is not taken into consideration and the thread simply waits until notified.
The thread T is then removed from the wait set for this object and re-enabled for thread scheduling. It then competes in the usual manner with other threads for the right to synchronize on the object; once it has gained control of the object, all its synchronization claims on the object are restored to the status quo ante - that is, to the situation as of the time that the wait method was invoked. Thread T then returns from the invocation of the wait method. Thus, on return from the wait method, the synchronization state of the object and of thread T is exactly as it was when the wait method was invoked.

A thread can also wake up without being notified, interrupted, or timing out, a so-called spurious wakeup. While this will rarely occur in practice, applications must guard against it by testing for the condition that should have caused the thread to be awakened, and continuing to wait if the condition is not satisfied. In other words, waits should always occur in loops, like this one:

     synchronized (obj) {
         while (<condition does not hold>)
             obj.wait(timeout);
         ... // Perform action appropriate to condition
     }
 
(For more information on this topic, see Section 3.2.3 in Doug Lea's "Concurrent Programming in Java (Second Edition)" (Addison-Wesley, 2000), or Item 50 in Joshua Bloch's "Effective Java Programming Language Guide" (Addison-Wesley, 2001).

If the current thread is interrupted by another thread while it is waiting, then an InterruptedException is thrown. This exception is not thrown until the lock status of this object has been restored as described above.

Note that the wait method, as it places the current thread into the wait set for this object, unlocks only this object; any other objects on which the current thread may be synchronized remain locked while the thread waits.

This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.

Parameters
timeoutthe maximum time to wait in milliseconds.
Throws
IllegalArgumentExceptionif the value of timeout is negative.
IllegalMonitorStateExceptionif the current thread is not the owner of the object's monitor.
InterruptedExceptionif another thread interrupted the current thread before or while the current thread was waiting for a notification. The interrupted status of the current thread is cleared when this exception is thrown.
Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.

This method is similar to the wait method of one argument, but it allows finer control over the amount of time to wait for a notification before giving up. The amount of real time, measured in nanoseconds, is given by:

 1000000*timeout+nanos

In all other respects, this method does the same thing as the method of one argument. In particular, wait(0, 0) means the same thing as wait(0).

The current thread must own this object's monitor. The thread releases ownership of this monitor and waits until either of the following two conditions has occurred:

  • Another thread notifies threads waiting on this object's monitor to wake up either through a call to the notify method or the notifyAll method.
  • The timeout period, specified by timeout milliseconds plus nanos nanoseconds arguments, has elapsed.

The thread then waits until it can re-obtain ownership of the monitor and resumes execution.

As in the one argument version, interrupts and spurious wakeups are possible, and this method should always be used in a loop:

     synchronized (obj) {
         while (<condition does not hold>)
             obj.wait(timeout, nanos);
         ... // Perform action appropriate to condition
     }
 
This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.
Parameters
timeoutthe maximum time to wait in milliseconds.
nanosadditional time, in nanoseconds range 0-999999.
Throws
IllegalArgumentExceptionif the value of timeout is negative or the value of nanos is not in the range 0-999999.
IllegalMonitorStateExceptionif the current thread is not the owner of this object's monitor.
InterruptedExceptionif another thread interrupted the current thread before or while the current thread was waiting for a notification. The interrupted status of the current thread is cleared when this exception is thrown.