ICU 66.0.1  66.0.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:
icu::UMemory

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
nameTypeThe name type.
matchLengthThe match length.
mzIDThe metazone ID.
statusReceives 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
nameTypeThe name type.
matchLengthThe match length.
tzIDThe time zone ID.
statusReceives 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
idxThe 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
idxThe index
mzIDReceives 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
idxThe 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
idxThe index
tzIDReceives 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: