Added in API level 24

AlphabeticIndex.Bucket


public static class AlphabeticIndex.Bucket
extends Object implements Iterable<Record<V>>

java.lang.Object
   ↳ android.icu.text.AlphabeticIndex.Bucket<V>


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

Public methods

String getLabel()

Get the label

AlphabeticIndex.Bucket.LabelType getLabelType()

Is a normal, underflow, overflow, or inflow bucket

Iterator<Record<V>> iterator()

Iterator over the records in the bucket

int size()

Get the number of records in the bucket.

String toString()

Standard toString()

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

default void forEach(Consumer<? super T> action)

Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception.

abstract Iterator<Record<V>> iterator()

Returns an iterator over elements of type T.

default Spliterator<Record<V>> spliterator()

Creates a Spliterator over the elements described by this Iterable.

Public methods

getLabel

Added in API level 24
public String getLabel ()

Get the label

Returns
String label for the bucket

getLabelType

Added in API level 24
public AlphabeticIndex.Bucket.LabelType getLabelType ()

Is a normal, underflow, overflow, or inflow bucket

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

iterator

Added in API level 24
public Iterator<Record<V>> iterator ()

Iterator over the records in the bucket

Returns
Iterator<Record<V>> an Iterator.

size

Added in API level 24
public int size ()

Get the number of records in the bucket.

Returns
int number of records in bucket

toString

Added in API level 24
public String toString ()

Standard toString()

Returns
String a string representation of the object.