AlphabeticIndex.GetBucketIndex Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetBucketIndex(String) |
Get the bucket number for the given name. |
GetBucketIndex(ICharSequence) |
Get the bucket number for the given name. |
GetBucketIndex(String)
Get the bucket number for the given name.
public int GetBucketIndex (string? name);
member this.GetBucketIndex : string -> int
Parameters
- name
- String
Name, such as a name
Returns
the bucket index for the name
Remarks
Get the bucket number for the given name. This routine permits callers to implement their own bucket handling mechanisms, including client-server handling. For example, when a new name is created on the client, it can ask the server for the bucket for that name, and the sortkey (using getCollator). Once the client has that information, it can put the name into the right bucket, and sort it within that bucket, without having access to the index or collator.
Note that the bucket number (and sort key) are only valid for the settings of the current AlphabeticIndex; if those are changed, then the bucket number and sort key must be regenerated.
Java documentation for android.icu.text.AlphabeticIndex.getBucketIndex(java.lang.CharSequence)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
GetBucketIndex(ICharSequence)
Get the bucket number for the given name.
[Android.Runtime.Register("getBucketIndex", "(Ljava/lang/CharSequence;)I", "", ApiSince=24)]
public int GetBucketIndex (Java.Lang.ICharSequence? name);
[<Android.Runtime.Register("getBucketIndex", "(Ljava/lang/CharSequence;)I", "", ApiSince=24)>]
member this.GetBucketIndex : Java.Lang.ICharSequence -> int
Parameters
- name
- ICharSequence
Name, such as a name
Returns
the bucket index for the name
- Attributes
Remarks
Get the bucket number for the given name. This routine permits callers to implement their own bucket handling mechanisms, including client-server handling. For example, when a new name is created on the client, it can ask the server for the bucket for that name, and the sortkey (using getCollator). Once the client has that information, it can put the name into the right bucket, and sort it within that bucket, without having access to the index or collator.
Note that the bucket number (and sort key) are only valid for the settings of the current AlphabeticIndex; if those are changed, then the bucket number and sort key must be regenerated.
Java documentation for android.icu.text.AlphabeticIndex.getBucketIndex(java.lang.CharSequence)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.