Added in API level 24

Bucket


class Bucket<V : Any!> : MutableIterable<AlphabeticIndex.Record<V>!>
kotlin.Any
   ↳ android.icu.text.AlphabeticIndex.Bucket

An index "bucket" with a label string and type. It is referenced by AlphabeticIndex#getBucketIndex(CharSequence) and AlphabeticIndex.ImmutableIndex#getBucketIndex(CharSequence), returned by AlphabeticIndex.ImmutableIndex#getBucket(int), and AlphabeticIndex#addRecord(CharSequence, Object) adds a record into a bucket according to the record's name.

Summary

Nested classes

Type of the label

Public methods
open String!

Get the label

open AlphabeticIndex.Bucket.LabelType!

Is a normal, underflow, overflow, or inflow bucket

open MutableIterator<AlphabeticIndex.Record<V>!>

Iterator over the records in the bucket

open Int

Get the number of records in the bucket.

open String

Standard toString()

Public methods

getLabel

Added in API level 24
open fun getLabel(): String!

Get the label

Return
String! label for the bucket

getLabelType

Added in API level 24
open fun getLabelType(): AlphabeticIndex.Bucket.LabelType!

Is a normal, underflow, overflow, or inflow bucket

Return
AlphabeticIndex.Bucket.LabelType! is an underflow, overflow, or inflow bucket

iterator

Added in API level 24
open fun iterator(): MutableIterator<AlphabeticIndex.Record<V>!>

Iterator over the records in the bucket

Return
MutableIterator<AlphabeticIndex.Record<V>!> an Iterator.

size

Added in API level 24
open fun size(): Int

Get the number of records in the bucket.

Return
Int number of records in bucket

toString

Added in API level 24
open fun toString(): String

Standard toString()

Return
String a string representation of the object.