ICU 71.1 71.1

Public Member Functions
icu::TimeZoneNames::MatchInfoCollection Class Reference

`MatchInfoCollection` represents a collection of time zone name matches used by TimeZoneNames#find. More...

`#include <tznames.h>`

Inheritance diagram for icu::TimeZoneNames::MatchInfoCollection:

## Public Member Functions
| MatchInfoCollection ()
| Constructor. More...
virtual | ~MatchInfoCollection ()
| Destructor. More...
void | addZone (UTimeZoneNameType nameType, int32_t matchLength, const UnicodeString &tzID, UErrorCode &status)
| Adds a zone match. More...
void | addMetaZone (UTimeZoneNameType nameType, int32_t matchLength, const UnicodeString &mzID, UErrorCode &status)
| Adds a meata zone match. More...
int32_t | size () const
| Returns the number of entries available in this object. More...
UTimeZoneNameType | getNameTypeAt (int32_t idx) const
| Returns the time zone name type of a match at the specified index. More...
int32_t | getMatchLengthAt (int32_t idx) const
| Returns the match length of a match at the specified index. More...
UBool | getTimeZoneIDAt (int32_t idx, UnicodeString &tzID) const
| Gets the zone ID of a match at the specified index. More...
UBool | getMetaZoneIDAt (int32_t idx, UnicodeString &mzID) const
| Gets the metazone ID of a match at the specified index. More...

## Detailed Description

`MatchInfoCollection` represents a collection of time zone name matches used by TimeZoneNames#find.

Internal:
  Do not use. This API is for internal use only.

Definition at line 310 of file tznames.h.

## Constructor & Destructor Documentation

## ◆ MatchInfoCollection()

icu::TimeZoneNames::MatchInfoCollection::MatchInfoCollection | ( |  | ) |

Constructor.

Internal:
  Do not use. This API is for internal use only.

## ◆ ~MatchInfoCollection()

virtual icu::TimeZoneNames::MatchInfoCollection::~MatchInfoCollection | ( |  | ) |
| virtual

Destructor.

Internal:
  Do not use. This API is for internal use only.

## Member Function Documentation

## ◆ addMetaZone()

void icu::TimeZoneNames::MatchInfoCollection::addMetaZone | ( | UTimeZoneNameType | nameType,
|  | int32_t | matchLength,
|  | const UnicodeString & | mzID,
|  | UErrorCode & | status
| ) |  |

Adds a meata zone match.

Parameters

  nameType | The name type.
  matchLength | The match length.
  mzID | The metazone ID.
  status | Receives the status

Internal:
  Do not use. This API is for internal use only.

## ◆ addZone()

void icu::TimeZoneNames::MatchInfoCollection::addZone | ( | UTimeZoneNameType | nameType,
|  | int32_t | matchLength,
|  | const UnicodeString & | tzID,
|  | UErrorCode & | status
| ) |  |

Adds a zone match.

Parameters

  nameType | The name type.
  matchLength | The match length.
  tzID | The time zone ID.
  status | Receives the status

Internal:
  Do not use. This API is for internal use only.

## ◆ getMatchLengthAt()

int32_t icu::TimeZoneNames::MatchInfoCollection::getMatchLengthAt | ( | int32_t | idx | ) | const

Returns the match length of a match at the specified index.

Parameters

  idx | The index

Returns
  The match length. If the specified idx is out of range, it returns 0.

Internal:
  Do not use. This API is for internal use only.

## ◆ getMetaZoneIDAt()

UBool icu::TimeZoneNames::MatchInfoCollection::getMetaZoneIDAt | ( | int32_t | idx,
|  | UnicodeString & | mzID
| ) |  | const

Gets the metazone ID of a match at the specified index.

Parameters

  idx | The index
  mzID | Receives the metazone ID

Returns
  true if the meta zone ID was set to mzID.

Internal:
  Do not use. This API is for internal use only.

## ◆ getNameTypeAt()

UTimeZoneNameType icu::TimeZoneNames::MatchInfoCollection::getNameTypeAt | ( | int32_t | idx | ) | const

Returns the time zone name type of a match at the specified index.

Parameters

  idx | The index

Returns
  The time zone name type. If the specified idx is out of range, it returns UTZNM_UNKNOWN.

See also
  UTimeZoneNameType

Internal:
  Do not use. This API is for internal use only.

## ◆ getTimeZoneIDAt()

UBool icu::TimeZoneNames::MatchInfoCollection::getTimeZoneIDAt | ( | int32_t | idx,
|  | UnicodeString & | tzID
| ) |  | const

Gets the zone ID of a match at the specified index.

Parameters

  idx | The index
  tzID | Receives the zone ID.

Returns
  true if the zone ID was set to tzID.

Internal:
  Do not use. This API is for internal use only.

## ◆ size()

int32_t icu::TimeZoneNames::MatchInfoCollection::size | ( |  | ) | const

Returns the number of entries available in this object.

Returns
  The number of entries.

Internal:
  Do not use. This API is for internal use only.

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

- tznames.h