public
static
final
class
AlphabeticIndex.ImmutableIndex
extends Object
implements
Iterable<Bucket<V>>
java.lang.Object | |
↳ | android.icu.text.AlphabeticIndex.ImmutableIndex<V> |
Immutable, thread-safe version of AlphabeticIndex
.
This class provides thread-safe methods for bucketing,
and random access to buckets and their properties,
but does not offer adding records to the index.
Public methods | |
---|---|
Bucket<V>
|
getBucket(int index)
Returns the index-th bucket. |
int
|
getBucketCount()
Returns the number of index buckets and labels, including underflow/inflow/overflow. |
int
|
getBucketIndex(CharSequence name)
Finds the index bucket for the given name and returns the number of that bucket. |
Iterator<Bucket<V>>
|
iterator()
Returns an iterator over elements of type |
Inherited methods | |
---|---|
From
class
java.lang.Object
| |
From
interface
java.lang.Iterable
|
Bucket<V> getBucket (int index)
Returns the index-th bucket. Returns null if the index is out of range.
Parameters | |
---|---|
index |
int :
bucket number |
Returns | |
---|---|
Bucket<V> |
the index-th bucket |
int getBucketCount ()
Returns the number of index buckets and labels, including underflow/inflow/overflow.
Returns | |
---|---|
int |
the number of index buckets |
int getBucketIndex (CharSequence name)
Finds the index bucket for the given name and returns the number of that bucket.
Use getBucket(int)
to get the bucket's properties.
Parameters | |
---|---|
name |
CharSequence :
the string to be sorted into an index bucket |
Returns | |
---|---|
int |
the bucket number for the name |
Iterator<Bucket<V>> iterator ()
Returns an iterator over elements of type T
.
Returns | |
---|---|
Iterator<Bucket<V>> |
an Iterator. |