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

ICU 76.1 76.1

Public Member Functions | Friends
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:

## Public Member Functions
Builder & | add (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
Builder & | operator= (const Builder &)=delete
| Builder (Builder &&)=delete
Builder & | operator= (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

  status | Input/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

  key | The key to be added. Passed by move
  status | Input/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

  status | Input/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:

- i18n/unicode/messageformat2_data_model.h