Package com.ibm.icu.text
Class AlphabeticIndex.Bucket<V>
java.lang.Object
com.ibm.icu.text.AlphabeticIndex.Bucket<V>
- Type Parameters:
V
- Data type
- All Implemented Interfaces:
Iterable<AlphabeticIndex.Record<V>>
- Enclosing class:
AlphabeticIndex<V>
public static class AlphabeticIndex.Bucket<V>
extends Object
implements Iterable<AlphabeticIndex.Record<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.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AlphabeticIndex.Bucket
<V> private int
private final String
private final AlphabeticIndex.Bucket.LabelType
private final String
private List
<AlphabeticIndex.Record<V>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Bucket
(String label, String lowerBoundary, AlphabeticIndex.Bucket.LabelType labelType) Set up the bucket. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
label
-
lowerBoundary
-
labelType
-
displayBucket
-
displayIndex
private int displayIndex -
records
-
-
Constructor Details
-
Bucket
Set up the bucket.- Parameters:
label
- label for the bucketlabelType
- is an underflow, overflow, or inflow bucket
-
-
Method Details
-
getLabel
Get the label- Returns:
- label for the bucket
-
getLabelType
Is a normal, underflow, overflow, or inflow bucket- Returns:
- is an underflow, overflow, or inflow bucket
-
size
public int size()Get the number of records in the bucket.- Returns:
- number of records in bucket
-
iterator
Iterator over the records in the bucket -
toString
Standard toString()
-