ICU 76.1 76.1
icu::message2::data_model::SelectorKeys::Builder Class Reference

The mutable SelectorKeys::Builder class allows the key list to be constructed one key at a time. More...

#include <messageformat2_data_model.h>

Inheritance diagram for icu::message2::data_model::SelectorKeys::Builder:
icu::UMemory

Public Member Functions

Builderadd (Key &&key, UErrorCode &status) noexcept
 Adds a single key to the list.
 
SelectorKeys build (UErrorCode &status) const
 Constructs a new immutable SelectorKeys using the list of keys set with previous add() calls.
 
 Builder (UErrorCode &status)
 Default constructor.
 
virtual ~Builder ()
 Destructor.
 
 Builder (const Builder &)=delete
 
Builderoperator= (const Builder &)=delete
 
 Builder (Builder &&)=delete
 
Builderoperator= (Builder &&)=delete
 

Friends

class SelectorKeys
 

Detailed Description

The mutable SelectorKeys::Builder class allows the key list to be constructed one key at a time.

Builder is not copyable or movable.

Internal
Do not use. This API is for internal use only. ICU 75 technology preview
Deprecated
This API is for technology preview only.

Definition at line 540 of file messageformat2_data_model.h.

Constructor & Destructor Documentation

◆ Builder()

icu::message2::data_model::SelectorKeys::Builder::Builder ( UErrorCode & status)

Default constructor.

Returns a Builder with an empty list of keys.

Parameters
statusInput/output error code
Internal
Do not use. This API is for internal use only. ICU 75 technology preview
Deprecated
This API is for technology preview only.

◆ ~Builder()

virtual icu::message2::data_model::SelectorKeys::Builder::~Builder ( )
virtual

Destructor.

Internal
Do not use. This API is for internal use only. ICU 75 technology preview
Deprecated
This API is for technology preview only.

Member Function Documentation

◆ add()

Builder & icu::message2::data_model::SelectorKeys::Builder::add ( Key && key,
UErrorCode & status )
noexcept

Adds a single key to the list.

Parameters
keyThe key to be added. Passed by move
statusInput/output error code
Returns
A reference to the builder.
Internal
Do not use. This API is for internal use only. ICU 75 technology preview
Deprecated
This API is for technology preview only.

◆ build()

SelectorKeys icu::message2::data_model::SelectorKeys::Builder::build ( UErrorCode & status) const

Constructs a new immutable SelectorKeys using the list of keys set with previous add() calls.

The builder object (this) can still be used after calling build().

Parameters
statusInput/output error code
Returns
The new SelectorKeys object
Internal
Do not use. This API is for internal use only. ICU 75 technology preview
Deprecated
This API is for technology preview only.

Friends And Related Symbol Documentation

◆ SelectorKeys

friend class SelectorKeys
friend

Definition at line 542 of file messageformat2_data_model.h.


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