icu::AlphabeticIndex::ImmutableIndex Class Reference

Immutable, thread-safe version of AlphabeticIndex. More...

#include <alphaindex.h>

Inheritance diagram for icu::AlphabeticIndex::ImmutableIndex:
icu::UObject icu::UMemory

Public Member Functions

virtual ~ImmutableIndex ()
 Destructor.
int32_t getBucketCount () const
 Returns the number of index buckets and labels, including underflow/inflow/overflow.
int32_t getBucketIndex (const UnicodeString &name, UErrorCode &errorCode) const
 Finds the index bucket for the given name and returns the number of that bucket.
const BucketgetBucket (int32_t index) const
 Returns the index-th bucket.

Friends

class AlphabeticIndex

Detailed Description

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.

The ImmutableIndex class is not intended for public subclassing.

Stable:
ICU 51

Definition at line 245 of file alphaindex.h.


Constructor & Destructor Documentation

virtual icu::AlphabeticIndex::ImmutableIndex::~ImmutableIndex (  )  [virtual]

Destructor.

Stable:
ICU 51

Member Function Documentation

const Bucket* icu::AlphabeticIndex::ImmutableIndex::getBucket ( int32_t  index  )  const

Returns the index-th bucket.

Returns NULL if the index is out of range.

Parameters:
index bucket number
Returns:
the index-th bucket
Stable:
ICU 51
int32_t icu::AlphabeticIndex::ImmutableIndex::getBucketCount (  )  const

Returns the number of index buckets and labels, including underflow/inflow/overflow.

Returns:
the number of index buckets
Stable:
ICU 51
int32_t icu::AlphabeticIndex::ImmutableIndex::getBucketIndex ( const UnicodeString name,
UErrorCode errorCode 
) const

Finds the index bucket for the given name and returns the number of that bucket.

Use getBucket() to get the bucket's properties.

Parameters:
name the string to be sorted into an index bucket
Returns:
the bucket number for the name
Stable:
ICU 51

The documentation for this class was generated from the following file:

Generated on 24 Jul 2019 for ICU 57.1 by  doxygen 1.6.1