com.ibm.icu.text
Class AlphabeticIndex.Bucket<V>

java.lang.Object
  extended by 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>>

A "bucket", containing records sorted under an index string by getIndexBucketCharacters. Is created by the addBucket method in BucketList. A typical implementation will provide methods getLabel(), getSpecial(), and getValues().
See com.ibm.icu.dev.test.collator.IndexCharactersTest for an example.

Status:
Draft ICU 4.6.

Nested Class Summary
static class AlphabeticIndex.Bucket.LabelType
          Type of the label
 
Method Summary
 String getLabel()
          Get the label
 AlphabeticIndex.Bucket.LabelType getLabelType()
          Is a normal, underflow, overflow, or inflow bucket
 Iterator<AlphabeticIndex.Record<V>> iterator()
          Iterator over the records in the bucket
 int size()
          Get the number of records in the bucket.
 String toString()
          Standard toString()
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getLabel

public String getLabel()
Get the label

Returns:
label for the bucket
Status:
Draft ICU 4.6.

getLabelType

public AlphabeticIndex.Bucket.LabelType getLabelType()
Is a normal, underflow, overflow, or inflow bucket

Returns:
is an underflow, overflow, or inflow bucket
Status:
Draft ICU 4.6.

size

public int size()
Get the number of records in the bucket.

Returns:
number of records in bucket
Status:
Draft ICU 4.6.

iterator

public Iterator<AlphabeticIndex.Record<V>> iterator()
Iterator over the records in the bucket

Specified by:
iterator in interface Iterable<AlphabeticIndex.Record<V>>
Status:
Draft ICU 4.6.

toString

public String toString()
Standard toString()

Overrides:
toString in class Object
Status:
Draft ICU 4.6.


Copyright (c) 2010 IBM Corporation and others.