Character.Subset
Stay organized with collections
Save and categorize content based on your preferences.
Known Direct Subclasses
Character.UnicodeBlock |
A family of character subsets representing the character blocks in the
Unicode specification. |
|
Instances of this class represent particular subsets of the Unicode
character set. The only family of subsets defined in the
Character
class is Character.UnicodeBlock
.
Other portions of the Java API may define other subsets for their
own purposes.
Protected Constructor Summary
Public Method Summary
final
boolean
|
equals( Object obj)
Compares two Subset objects for equality.
|
final
int
|
|
final
String
|
toString()
Returns the name of this subset.
|
Inherited Method Summary
From class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this Object .
|
boolean
|
equals( Object obj)
Compares this instance with the specified object and indicates if they
are equal.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
final
Class<?>
|
getClass()
Returns the unique instance of Class that represents this
object's class.
|
int
|
hashCode()
Returns an integer hash code for this object.
|
final
void
|
notify()
Causes a thread which is waiting on this object's monitor (by means of
calling one of the wait() methods) to be woken up.
|
final
void
|
notifyAll()
Causes all threads which are waiting on this object's monitor (by means
of calling one of the wait() methods) to be woken up.
|
String
|
toString()
Returns a string containing a concise, human-readable description of this
object.
|
final
void
|
wait(long timeout, int nanos)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait(long timeout)
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object or until the
specified timeout expires.
|
final
void
|
wait()
Causes the calling thread to wait until another thread calls the notify() or notifyAll() method of this object.
|
Protected Constructors
protected
Subset
(String name)
Constructs a new Subset
instance.
Parameters
name |
The name of this subset |
Public Methods
public
final
boolean
equals
(Object obj)
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.
Parameters
obj |
the object to compare this instance with. |
Returns
true
if the specified object is equal to this Object
; false
otherwise.
public
final
int
hashCode
()
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.
public
final
String
toString
()
Returns the name of this subset.
Returns
- a printable representation of this object.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003e\u003ccode\u003eCharacter.Subset\u003c/code\u003e represents specific subsets of the Unicode character set, with \u003ccode\u003eCharacter.UnicodeBlock\u003c/code\u003e being a primary example.\u003c/p\u003e\n"],["\u003cp\u003eThis class provides a way to categorize and work with groups of Unicode characters, like those in a specific language or script.\u003c/p\u003e\n"],["\u003cp\u003eIt includes methods for comparison (\u003ccode\u003eequals\u003c/code\u003e), hashing (\u003ccode\u003ehashCode\u003c/code\u003e), and getting the subset's name (\u003ccode\u003etoString\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCharacter.Subset\u003c/code\u003e is extensible, allowing other parts of the Java API to define their own custom character subsets.\u003c/p\u003e\n"]]],["`Character.Subset` represents subsets of the Unicode character set, with `Character.UnicodeBlock` as the only predefined family. A `Subset` instance is constructed with a name. Key methods include `equals` for object comparison, `hashCode` for hash code retrieval, and `toString` to get the subset's name. It inherits methods from `Object`, such as `clone`, `wait`, and `notify`. Subclasses cannot override `equals` and `hashCode`.\n"],null,["# Character.Subset\n\npublic static class **Character.Subset** extends [Object](../../../reference/java/lang/Object.html) \n\n|---|---|---|\n| Known Direct Subclasses [Character.UnicodeBlock](../../../reference/java/lang/Character.UnicodeBlock.html) |------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------| | [Character.UnicodeBlock](../../../reference/java/lang/Character.UnicodeBlock.html) | A family of character subsets representing the character blocks in the Unicode specification. | |||\n\nInstances of this class represent particular subsets of the Unicode\ncharacter set. The only family of subsets defined in the\n`Character` class is [Character.UnicodeBlock](../../../reference/java/lang/Character.UnicodeBlock.html).\nOther portions of the Java API may define other subsets for their\nown purposes. \n\n### Protected Constructor Summary\n\n|---|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [Subset](../../../reference/java/lang/Character.Subset.html#Subset(java.lang.String))([String](../../../reference/java/lang/String.html) name) Constructs a new `Subset` instance. |\n\n### Public Method Summary\n\n|----------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| final boolean | [equals](../../../reference/java/lang/Character.Subset.html#equals(java.lang.Object))([Object](../../../reference/java/lang/Object.html) obj) Compares two `Subset` objects for equality. |\n| final int | [hashCode](../../../reference/java/lang/Character.Subset.html#hashCode())() Returns the standard hash code as defined by the [Object.hashCode()](../../../reference/java/lang/Object.html#hashCode()) method. |\n| final [String](../../../reference/java/lang/String.html) | [toString](../../../reference/java/lang/Character.Subset.html#toString())() Returns the name of this subset. |\n\n### Inherited Method Summary\n\nFrom class [java.lang.Object](../../../reference/java/lang/Object.html) \n\n|-------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Object](../../../reference/java/lang/Object.html) | [clone](../../../reference/java/lang/Object.html#clone())() Creates and returns a copy of this `Object`. |\n| boolean | [equals](../../../reference/java/lang/Object.html#equals(java.lang.Object))([Object](../../../reference/java/lang/Object.html) obj) Compares this instance with the specified object and indicates if they are equal. |\n| void | [finalize](../../../reference/java/lang/Object.html#finalize())() Invoked when the garbage collector has detected that this instance is no longer reachable. |\n| final [Class](../../../reference/java/lang/Class.html)\\\u003c?\\\u003e | [getClass](../../../reference/java/lang/Object.html#getClass())() Returns the unique instance of [Class](../../../reference/java/lang/Class.html) that represents this object's class. |\n| int | [hashCode](../../../reference/java/lang/Object.html#hashCode())() Returns an integer hash code for this object. |\n| final void | [notify](../../../reference/java/lang/Object.html#notify())() Causes a thread which is waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |\n| final void | [notifyAll](../../../reference/java/lang/Object.html#notifyAll())() Causes all threads which are waiting on this object's monitor (by means of calling one of the `wait()` methods) to be woken up. |\n| [String](../../../reference/java/lang/String.html) | [toString](../../../reference/java/lang/Object.html#toString())() Returns a string containing a concise, human-readable description of this object. |\n| final void | [wait](../../../reference/java/lang/Object.html#wait(long,%20int))(long timeout, int nanos) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |\n| final void | [wait](../../../reference/java/lang/Object.html#wait(long))(long timeout) Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object or until the specified timeout expires. |\n| final void | [wait](../../../reference/java/lang/Object.html#wait())() Causes the calling thread to wait until another thread calls the `notify()` or `notifyAll()` method of this object. |\n\nProtected Constructors\n----------------------\n\n#### protected\n**Subset**\n([String](../../../reference/java/lang/String.html) name)\n\nConstructs a new `Subset` instance. \n\n##### Parameters\n\n| name | The name of this subset |\n|------|-------------------------|\n\n##### Throws\n\n| [NullPointerException](../../../reference/java/lang/NullPointerException.html) | if name is `null` |\n|--------------------------------------------------------------------------------|-------------------|\n\nPublic Methods\n--------------\n\n#### public final boolean\n**equals**\n([Object](../../../reference/java/lang/Object.html) obj)\n\nCompares two `Subset` objects for equality.\nThis method returns `true` if and only if\n`this` and the argument refer to the same\nobject; since this method is `final`, this\nguarantee holds for all subclasses. \n\n##### Parameters\n\n| obj | the object to compare this instance with. |\n|-----|-------------------------------------------|\n\n##### Returns\n\n- `true` if the specified object is equal to this `Object`; `false` otherwise. \n\n#### public final int\n**hashCode**\n()\n\nReturns the standard hash code as defined by the\n[Object.hashCode()](../../../reference/java/lang/Object.html#hashCode()) method. This method\nis `final` in order to ensure that the\n`equals` and `hashCode` methods will\nbe consistent in all subclasses. \n\n##### Returns\n\n- this object's hash code. \n\n#### public final [String](../../../reference/java/lang/String.html)\n**toString**\n()\n\nReturns the name of this subset. \n\n##### Returns\n\n- a printable representation of this object."]]