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:
java.lang.Iterable<AlphabeticIndex.Record<V>>
- Enclosing class:
- AlphabeticIndex<V>
public static class AlphabeticIndex.Bucket<V> extends java.lang.Object implements java.lang.Iterable<AlphabeticIndex.Record<V>>
An index "bucket" with a label string and type. It is referenced byAlphabeticIndex.getBucketIndex(CharSequence)
andAlphabeticIndex.ImmutableIndex.getBucketIndex(CharSequence)
, returned byAlphabeticIndex.ImmutableIndex.getBucket(int)
, andAlphabeticIndex.addRecord(CharSequence, Object)
adds a record into a bucket according to the record's name.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AlphabeticIndex.Bucket.LabelType
Type of the label
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getLabel()
Get the labelAlphabeticIndex.Bucket.LabelType
getLabelType()
Is a normal, underflow, overflow, or inflow bucketjava.util.Iterator<AlphabeticIndex.Record<V>>
iterator()
Iterator over the records in the bucketint
size()
Get the number of records in the bucket.java.lang.String
toString()
Standard toString()
-
-
-
Method Detail
-
getLabel
public java.lang.String getLabel()
Get the label- Returns:
- label for the bucket
-
getLabelType
public AlphabeticIndex.Bucket.LabelType 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
public java.util.Iterator<AlphabeticIndex.Record<V>> iterator()
Iterator over the records in the bucket- Specified by:
iterator
in interfacejava.lang.Iterable<V>
-
toString
public java.lang.String toString()
Standard toString()- Overrides:
toString
in classjava.lang.Object
-
-