Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > f51238514e2abe817779ad2fe01b0759 > files > 156

icu-doc-4.4-2.1mdv2010.2.i586.rpm

<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>ICU 4.4: PluralFormat Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Generated by Doxygen 1.6.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <img id="MSearchSelect" src="search/search.png"
             onmouseover="return searchBox.OnSearchSelectShow()"
             onmouseout="return searchBox.OnSearchSelectHide()"
             alt=""/>
        <input type="text" id="MSearchField" value="Search" accesskey="S"
             onfocus="searchBox.OnSearchFieldFocus(true)" 
             onblur="searchBox.OnSearchFieldFocus(false)" 
             onkeyup="searchBox.OnSearchFieldChange(event)"/>
        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
        </div>
      </li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&nbsp;Structure&nbsp;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&nbsp;Fields</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>PluralFormat Class Reference</h1><!-- doxytag: class="PluralFormat" --><!-- doxytag: inherits="Format" -->
<p><code>#include &lt;<a class="el" href="plurfmt_8h_source.html">plurfmt.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for PluralFormat:</div>
<div class="dynsection">
 <div class="center">
  <img src="classPluralFormat.gif" usemap="#PluralFormat_map" alt=""/>
  <map id="PluralFormat_map" name="PluralFormat_map">
<area href="classFormat.html" alt="Format" shape="rect" coords="0,112,84,136"/>
<area href="classUObject.html" alt="UObject" shape="rect" coords="0,56,84,80"/>
<area href="classUMemory.html" alt="UMemory" shape="rect" coords="0,0,84,24"/>
</map>
 </div>
</div>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#a8c410b4369566683e6a33db2de78f30c">PluralFormat</a> (<a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a new <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> for the default locale.  <a href="#a8c410b4369566683e6a33db2de78f30c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#a8756792ec1c169beb733656917a85341">PluralFormat</a> (const <a class="el" href="classLocale.html">Locale</a> &amp;locale, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a new <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> for a given locale.  <a href="#a8756792ec1c169beb733656917a85341"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#a1300f3fd9d160d545df23ccd7513c0cb">PluralFormat</a> (const <a class="el" href="classPluralRules.html">PluralRules</a> &amp;rules, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a new <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> for a given set of rules.  <a href="#a1300f3fd9d160d545df23ccd7513c0cb"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#a85a71a69714385f2e573c57f6cb4993f">PluralFormat</a> (const <a class="el" href="classLocale.html">Locale</a> &amp;locale, const <a class="el" href="classPluralRules.html">PluralRules</a> &amp;rules, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a new <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> for a given set of rules.  <a href="#a85a71a69714385f2e573c57f6cb4993f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#a8b458e4762cb31e7ee15e72b7d15e934">PluralFormat</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;pattern, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a new <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> for a given pattern string.  <a href="#a8b458e4762cb31e7ee15e72b7d15e934"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#aafbce030c1b7bf47c0828832692ba41a">PluralFormat</a> (const <a class="el" href="classLocale.html">Locale</a> &amp;locale, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;pattern, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a new <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> for a given pattern string and locale.  <a href="#aafbce030c1b7bf47c0828832692ba41a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#a855e9ec92c89f5aa240f207e8aaa57ed">PluralFormat</a> (const <a class="el" href="classPluralRules.html">PluralRules</a> &amp;rules, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;pattern, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a new <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> for a given set of rules, a pattern and a locale.  <a href="#a855e9ec92c89f5aa240f207e8aaa57ed"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#af12d02e746d81166620f5cd6d83ce0ab">PluralFormat</a> (const <a class="el" href="classLocale.html">Locale</a> &amp;locale, const <a class="el" href="classPluralRules.html">PluralRules</a> &amp;rules, const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;pattern, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a new <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> for a given set of rules, a pattern and a locale.  <a href="#af12d02e746d81166620f5cd6d83ce0ab"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#a1e6fbf3c1ca8c824dd19002d0ab9cfc8">PluralFormat</a> (const <a class="el" href="classPluralFormat.html">PluralFormat</a> &amp;other)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">copy constructor.  <a href="#a1e6fbf3c1ca8c824dd19002d0ab9cfc8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#ab4f9f4e1052a57a64aadf939566b520e">~PluralFormat</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor.  <a href="#ab4f9f4e1052a57a64aadf939566b520e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#a2e4529df12fd1c2a6f62365a370f5695">applyPattern</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;pattern, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the pattern used by this plural format.  <a href="#a2e4529df12fd1c2a6f62365a370f5695"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#a574169695e8a514c4ba0f2dd070d0e71">format</a> (int32_t number, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formats a plural message for a given number.  <a href="#a574169695e8a514c4ba0f2dd070d0e71"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#a68cdf4bb5201604fa93949adf5e396f7">format</a> (double number, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formats a plural message for a given number.  <a href="#a68cdf4bb5201604fa93949adf5e396f7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#ad6e8a6ee99827d0ffbc24d6ae0c841b2">format</a> (int32_t number, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;pos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formats a plural message for a given number.  <a href="#ad6e8a6ee99827d0ffbc24d6ae0c841b2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#a7b852373bf7abda5355dfc56cafb79f7">format</a> (double number, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;pos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Formats a plural message for a given number.  <a href="#a7b852373bf7abda5355dfc56cafb79f7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#afe885b1b77e6e4581e61ec7e9ce3d860">setLocale</a> (const <a class="el" href="classLocale.html">Locale</a> &amp;locale, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the locale used by this <code>PluraFormat</code> object.  <a href="#afe885b1b77e6e4581e61ec7e9ce3d860"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#ab5d863d4822e3f40366c3fb9946703dc">setNumberFormat</a> (const <a class="el" href="classNumberFormat.html">NumberFormat</a> *format, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the number format used by this formatter.  <a href="#ab5d863d4822e3f40366c3fb9946703dc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classPluralFormat.html">PluralFormat</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#a4145baa65aaccfbc3ff6a8c34be82213">operator=</a> (const <a class="el" href="classPluralFormat.html">PluralFormat</a> &amp;other)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Assignment operator.  <a href="#a4145baa65aaccfbc3ff6a8c34be82213"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#ae7e12f077b16fb02f069d9830096d96b">operator==</a> (const <a class="el" href="classFormat.html">Format</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return true if another object is semantically equal to this one.  <a href="#ae7e12f077b16fb02f069d9830096d96b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#a6c1ce757f5aa6475aafa63c066f9825b">operator!=</a> (const <a class="el" href="classFormat.html">Format</a> &amp;other) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return true if another object is semantically unequal to this one.  <a href="#a6c1ce757f5aa6475aafa63c066f9825b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classFormat.html">Format</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#aeb3f76cdf69fb00fec050171662d3a09">clone</a> (void) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clones this <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> object polymorphically.  <a href="#aeb3f76cdf69fb00fec050171662d3a09"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#a405026e9c17195c2421bb30b96e458f4">format</a> (const <a class="el" href="classFormattable.html">Formattable</a> &amp;obj, <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;appendTo, <a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;pos, <a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;status) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Redeclared <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> method.  <a href="#a405026e9c17195c2421bb30b96e458f4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#a27d0ead83b43868194c44c3abfd423e9">toPattern</a> (<a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;appendTo)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the pattern from <a class="el" href="classPluralFormat.html#a2e4529df12fd1c2a6f62365a370f5695" title="Sets the pattern used by this plural format.">applyPattern()</a> or constructor().  <a href="#a27d0ead83b43868194c44c3abfd423e9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#a24e62f6a197c2b8e524dd40ce58a89c5">parseObject</a> (const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;source, <a class="el" href="classFormattable.html">Formattable</a> &amp;result, <a class="el" href="classParsePosition.html">ParsePosition</a> &amp;parse_pos) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This method is not yet supported by <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code>.  <a href="#a24e62f6a197c2b8e524dd40ce58a89c5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#a12e3f92dd37991545c313fd149107e9c">getDynamicClassID</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">ICU "poor man's RTTI", returns a UClassID for the actual class.  <a href="#a12e3f92dd37991545c313fd149107e9c"></a><br/></td></tr>
<tr><td colspan="2"><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classPluralFormat.html#aa3db9061fda6d0a85b8143f8d7bedcd5">getStaticClassID</a> (void)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">ICU "poor man's RTTI", returns a UClassID for this class.  <a href="#aa3db9061fda6d0a85b8143f8d7bedcd5"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p><code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> supports the creation of internationalized messages with plural inflection. It is based on <em>plural selection</em>, i.e. the caller specifies messages for each plural case that can appear in the users language and the <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> selects the appropriate message based on the number.  </p>
<h4>The Problem of Plural Forms in Internationalized Messages</h4>
<p>Different languages have different ways to inflect plurals. Creating internationalized messages that include plural forms is only feasible when the framework is able to handle plural forms of <em>all</em> languages correctly. <code><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a></code> doesn't handle this well, because it attaches a number interval to each message and selects the message whose interval contains a given number. This can only handle a finite number of intervals. But in some languages, like Polish, one plural case applies to infinitely many intervals (e.g., paucal applies to numbers ending with 2, 3, or 4 except those ending with 12, 13, or 14). Thus <code><a class="el" href="classChoiceFormat.html" title="ChoiceFormat converts between ranges of numeric values and string names for those...">ChoiceFormat</a></code> is not adequate. </p>
<p><code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> deals with this by breaking the problem into two parts: </p>
<ul>
<li>
It uses <code><a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a></code> that can define more complex conditions for a plural case than just a single interval. These plural rules define both what plural cases exist in a language, and to which numbers these cases apply. </li>
<li>
It provides predefined plural rules for many locales. Thus, the programmer need not worry about the plural cases of a language. On the flip side, the localizer does not have to specify the plural cases; he can simply use the predefined keywords. The whole plural formatting of messages can be done using localized patterns from resource bundles. </li>
</ul>
<h4>Usage of <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code></h4>
<p>This discussion assumes that you use <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> with a predefined set of plural rules. You can create one using one of the constructors that takes a <code>locale</code> object. To specify the message pattern, you can either pass it to the constructor or set it explicitly using the <code><a class="el" href="classPluralFormat.html#a2e4529df12fd1c2a6f62365a370f5695" title="Sets the pattern used by this plural format.">applyPattern()</a></code> method. The <code><a class="el" href="classPluralFormat.html#a574169695e8a514c4ba0f2dd070d0e71" title="Formats a plural message for a given number.">format()</a></code> method takes a number object and selects the message of the matching plural case. This message will be returned.  </p>
<h5>Patterns and Their Interpretation</h5>
<p>The pattern text defines the message output for each plural case of the used locale. The pattern is a sequence of <code><em>caseKeyword</em>{<em>message</em>}</code> clauses, separated by white space characters. Each clause assigns the message <code><em>message</em></code> to the plural case identified by <code><em>caseKeyword</em></code>. </p>
<p>You always have to define a message text for the default plural case "&lt;code&gt;other&lt;/code&gt;" which is contained in every rule set. If the plural rules of the <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> object do not contain a plural case identified by <code><em>caseKeyword</em></code>, U_DEFAULT_KEYWORD_MISSING will be set to status. If you do not specify a message text for a particular plural case, the message text of the plural case "&lt;code&gt;other&lt;/code&gt;" gets assigned to this plural case. If you specify more than one message for the same plural case, U_DUPLICATE_KEYWORD will be set to status. <br/>
 Spaces between <code><em>caseKeyword</em></code> and <code><em>message</em></code> will be ignored; spaces within <code><em>message</em></code> will be preserved. </p>
<p>The message text for a particular plural case may contain other message format patterns. <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> preserves these so that you can use the strings produced by <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> with other formatters. If you are using <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> inside a <code><a class="el" href="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a></code> pattern, <code><a class="el" href="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a></code> will automatically evaluate the resulting format pattern.<br/>
 Thus, curly braces (<code>{</code>, <code>}</code>) are <em>only</em> allowed in message texts to define a nested format pattern.<br/>
 The pound sign (<code>#</code>) will be interpreted as the number placeholder in the message text, if it is not contained in curly braces (to preserve <code><a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a></code> patterns). <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> will replace each of those pound signs by the number passed to the <code><a class="el" href="classPluralFormat.html#a574169695e8a514c4ba0f2dd070d0e71" title="Formats a plural message for a given number.">format()</a></code> method. It will be formatted using a <code><a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a></code> for the <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code>'s locale. If you need special number formatting, you have to explicitly specify a <code><a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a></code> for the <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> to use.  Example </p>
<pre>
 UErrorCode status = U_ZERO_ERROR;
 MessageFormat* msgFmt = new <a class="el" href="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a>(<a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a>("{0, plural,
   one{{0, number, C''est #,##0.0#  fichier}} other {Ce sont # fichiers}} dans la liste."),
   <a class="el" href="classLocale.html" title="A Locale object represents a specific geographical, political, or cultural region...">Locale</a>("fr"), status);
 if (<a class="el" href="utypes_8h.html#a4d202200b6aa6f3c965ea370e0c8155f" title="Does the error code indicate a failure?">U_FAILURE(status)</a>) {
     return;
 }
 <a class="el" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a> args1[] = {(int32_t)0};
 <a class="el" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a> args2[] = {(int32_t)3};
 <a class="el" href="classFieldPosition.html" title="FieldPosition is a simple class used by Format and its subclasses to identify fields...">FieldPosition</a> ignore(FieldPosition::DONT_CARE);
 <a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> result;
 msgFmt-&gt;format(args1, 1, result, ignore, status);
 cout &lt;&lt; result &lt;&lt; endl;
 result.remove();
 msgFmt-&gt;format(args2, 1, result, ignore, status);
 cout &lt;&lt; result &lt;&lt; endl;
 </pre><p> Produces the output:<br/>
 <code>C'est 0,0 fichier dans la liste.</code><br/>
 <code>Ce sont 3 fichiers dans la liste.</code> </p>
<p><b>Note:</b><br/>
 Currently <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> does not make use of quotes like <code><a class="el" href="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a></code>. If you use plural format strings with <code><a class="el" href="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a></code> and want to use a quote sign "&lt;code&gt;'&lt;/code&gt;", you have to write "&lt;code&gt;''&lt;/code&gt;". <code><a class="el" href="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a></code> unquotes this pattern and passes the unquoted pattern to <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code>. It's a bit trickier if you use nested formats that do quoting. In the example above, we wanted to insert "&lt;code&gt;'&lt;/code&gt;" in the number format pattern. Since <code><a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a></code> supports quotes, we had to insert "&lt;code&gt;''&lt;/code&gt;". But since <code><a class="el" href="classMessageFormat.html" title="MessageFormat produces concatenated messages in a language-neutral way.">MessageFormat</a></code> unquotes the pattern before it gets passed to <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code>, we have to double these quotes, i.e. write "&lt;code&gt;''''&lt;/code&gt;".  </p>
<h4>Defining Custom Plural Rules</h4>
<p>If you need to use <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> with custom rules, you can create a <code><a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a></code> object and pass it to <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code>'s constructor. If you also specify a locale in this constructor, this locale will be used to format the number in the message texts. </p>
<p>For more information about <code><a class="el" href="classPluralRules.html" title="Defines rules for mapping positive long values onto a small set of keywords.">PluralRules</a></code>, see <a class="el" href="classPluralRules.html">PluralRules</a>. </p>
<p>ported from Java </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002867">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

<p>Definition at line <a class="el" href="plurfmt_8h_source.html#l00174">174</a> of file <a class="el" href="plurfmt_8h_source.html">plurfmt.h</a>.</p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a8c410b4369566683e6a33db2de78f30c"></a><!-- doxytag: member="PluralFormat::PluralFormat" ref="a8c410b4369566683e6a33db2de78f30c" args="(UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PluralFormat::PluralFormat </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a new <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> for the default locale. </p>
<p>This locale will be used to get the set of plural rules and for standard number formatting. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002868">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a8756792ec1c169beb733656917a85341"></a><!-- doxytag: member="PluralFormat::PluralFormat" ref="a8756792ec1c169beb733656917a85341" args="(const Locale &amp;locale, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PluralFormat::PluralFormat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a new <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> for a given locale. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>locale</em>&nbsp;</td><td>the <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> will be configured with rules for this locale. This locale will also be used for standard number formatting. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002869">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a1300f3fd9d160d545df23ccd7513c0cb"></a><!-- doxytag: member="PluralFormat::PluralFormat" ref="a1300f3fd9d160d545df23ccd7513c0cb" args="(const PluralRules &amp;rules, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PluralFormat::PluralFormat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classPluralRules.html">PluralRules</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rules</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a new <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> for a given set of rules. </p>
<p>The standard number formatting will be done using the default locale. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rules</em>&nbsp;</td><td>defines the behavior of the <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002870">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a85a71a69714385f2e573c57f6cb4993f"></a><!-- doxytag: member="PluralFormat::PluralFormat" ref="a85a71a69714385f2e573c57f6cb4993f" args="(const Locale &amp;locale, const PluralRules &amp;rules, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PluralFormat::PluralFormat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classPluralRules.html">PluralRules</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rules</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a new <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> for a given set of rules. </p>
<p>The standard number formatting will be done using the given locale. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>locale</em>&nbsp;</td><td>the default number formatting will be done using this locale. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>rules</em>&nbsp;</td><td>defines the behavior of the <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002871">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a8b458e4762cb31e7ee15e72b7d15e934"></a><!-- doxytag: member="PluralFormat::PluralFormat" ref="a8b458e4762cb31e7ee15e72b7d15e934" args="(const UnicodeString &amp;pattern, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PluralFormat::PluralFormat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a new <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> for a given pattern string. </p>
<p>The default locale will be used to get the set of plural rules and for standard number formatting. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>the pattern for this <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code>. errors are returned to status if the pattern is invalid. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002872">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="aafbce030c1b7bf47c0828832692ba41a"></a><!-- doxytag: member="PluralFormat::PluralFormat" ref="aafbce030c1b7bf47c0828832692ba41a" args="(const Locale &amp;locale, const UnicodeString &amp;pattern, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PluralFormat::PluralFormat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a new <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> for a given pattern string and locale. </p>
<p>The locale will be used to get the set of plural rules and for standard number formatting. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>locale</em>&nbsp;</td><td>the <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> will be configured with rules for this locale. This locale will also be used for standard number formatting. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>the pattern for this <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code>. errors are returned to status if the pattern is invalid. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002873">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a855e9ec92c89f5aa240f207e8aaa57ed"></a><!-- doxytag: member="PluralFormat::PluralFormat" ref="a855e9ec92c89f5aa240f207e8aaa57ed" args="(const PluralRules &amp;rules, const UnicodeString &amp;pattern, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PluralFormat::PluralFormat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classPluralRules.html">PluralRules</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rules</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a new <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> for a given set of rules, a pattern and a locale. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>rules</em>&nbsp;</td><td>defines the behavior of the <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>the pattern for this <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code>. errors are returned to status if the pattern is invalid. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002874">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="af12d02e746d81166620f5cd6d83ce0ab"></a><!-- doxytag: member="PluralFormat::PluralFormat" ref="af12d02e746d81166620f5cd6d83ce0ab" args="(const Locale &amp;locale, const PluralRules &amp;rules, const UnicodeString &amp;pattern, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PluralFormat::PluralFormat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classPluralRules.html">PluralRules</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>rules</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a new <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> for a given set of rules, a pattern and a locale. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>locale</em>&nbsp;</td><td>the <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> will be configured with rules for this locale. This locale will also be used for standard number formatting. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>rules</em>&nbsp;</td><td>defines the behavior of the <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>the pattern for this <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code>. errors are returned to status if the pattern is invalid. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002875">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a1e6fbf3c1ca8c824dd19002d0ab9cfc8"></a><!-- doxytag: member="PluralFormat::PluralFormat" ref="a1e6fbf3c1ca8c824dd19002d0ab9cfc8" args="(const PluralFormat &amp;other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PluralFormat::PluralFormat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classPluralFormat.html">PluralFormat</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>copy constructor. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002876">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ab4f9f4e1052a57a64aadf939566b520e"></a><!-- doxytag: member="PluralFormat::~PluralFormat" ref="ab4f9f4e1052a57a64aadf939566b520e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual PluralFormat::~PluralFormat </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002877">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a2e4529df12fd1c2a6f62365a370f5695"></a><!-- doxytag: member="PluralFormat::applyPattern" ref="a2e4529df12fd1c2a6f62365a370f5695" args="(const UnicodeString &amp;pattern, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PluralFormat::applyPattern </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pattern</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the pattern used by this plural format. </p>
<p>The method parses the pattern and creates a map of format strings for the plural rules. Patterns and their interpretation are specified in the class description.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pattern</em>&nbsp;</td><td>the pattern for this plural format errors are returned to status if the pattern is invalid. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002878">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="aeb3f76cdf69fb00fec050171662d3a09"></a><!-- doxytag: member="PluralFormat::clone" ref="aeb3f76cdf69fb00fec050171662d3a09" args="(void) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classFormat.html">Format</a>* PluralFormat::clone </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Clones this <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> object polymorphically. </p>
<p>The caller owns the result and should delete it when done. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002888">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

<p>Implements <a class="el" href="classFormat.html#a4e7ebd5cfd390c35e2bda88257f8b51a">Format</a>.</p>

</div>
</div>
<a class="anchor" id="a405026e9c17195c2421bb30b96e458f4"></a><!-- doxytag: member="PluralFormat::format" ref="a405026e9c17195c2421bb30b96e458f4" args="(const Formattable &amp;obj, UnicodeString &amp;appendTo, FieldPosition &amp;pos, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; PluralFormat::format </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classFormattable.html">Formattable</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>appendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Redeclared <a class="el" href="classFormat.html" title="Base class for all formats.">Format</a> method. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>obj</em>&nbsp;</td><td>The object to be formatted into a string. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>appendTo</em>&nbsp;</td><td>output parameter to receive result. Result is appended to existing contents. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>On input: an alignment field, if desired. On output: the offsets of the alignment field. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>output param filled with success/failure status. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Reference to 'appendTo' parameter. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002889">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

<p>Implements <a class="el" href="classFormat.html#a12ffb857c5c9a553270dfe9a71fbd8e9">Format</a>.</p>

</div>
</div>
<a class="anchor" id="a7b852373bf7abda5355dfc56cafb79f7"></a><!-- doxytag: member="PluralFormat::format" ref="a7b852373bf7abda5355dfc56cafb79f7" args="(double number, UnicodeString &amp;appendTo, FieldPosition &amp;pos, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; PluralFormat::format </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>appendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Formats a plural message for a given number. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>number</em>&nbsp;</td><td>a number for which the plural message should be formatted for. If no pattern has been applied to this <a class="el" href="classPluralFormat.html">PluralFormat</a> object yet, the formatted number will be returned. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>appendTo</em>&nbsp;</td><td>output parameter to receive result. result is appended to existing contents. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>On input: an alignment field, if desired. On output: the offsets of the alignment field. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the string containing the formatted plural message. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002882">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ad6e8a6ee99827d0ffbc24d6ae0c841b2"></a><!-- doxytag: member="PluralFormat::format" ref="ad6e8a6ee99827d0ffbc24d6ae0c841b2" args="(int32_t number, UnicodeString &amp;appendTo, FieldPosition &amp;pos, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; PluralFormat::format </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>appendTo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFieldPosition.html">FieldPosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>pos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Formats a plural message for a given number. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>number</em>&nbsp;</td><td>a number for which the plural message should be formatted for. If no pattern has been applied to this <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> object yet, the formatted number will be returned. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>appendTo</em>&nbsp;</td><td>output parameter to receive result. result is appended to existing contents. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>On input: an alignment field, if desired. On output: the offsets of the alignment field. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the string containing the formatted plural message. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002881">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a68cdf4bb5201604fa93949adf5e396f7"></a><!-- doxytag: member="PluralFormat::format" ref="a68cdf4bb5201604fa93949adf5e396f7" args="(double number, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a> PluralFormat::format </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Formats a plural message for a given number. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>number</em>&nbsp;</td><td>a number for which the plural message should be formatted for. If no pattern has been applied to this <a class="el" href="classPluralFormat.html">PluralFormat</a> object yet, the formatted number will be returned. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>output param set to success or failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the string containing the formatted plural message. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002880">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a574169695e8a514c4ba0f2dd070d0e71"></a><!-- doxytag: member="PluralFormat::format" ref="a574169695e8a514c4ba0f2dd070d0e71" args="(int32_t number, UErrorCode &amp;status) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a> PluralFormat::format </td>
          <td>(</td>
          <td class="paramtype">int32_t&nbsp;</td>
          <td class="paramname"> <em>number</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Formats a plural message for a given number. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>number</em>&nbsp;</td><td>a number for which the plural message should be formatted for. If no pattern has been applied to this <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code> object yet, the formatted number will be returned. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the string containing the formatted plural message. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002879">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a12e3f92dd37991545c313fd149107e9c"></a><!-- doxytag: member="PluralFormat::getDynamicClassID" ref="a12e3f92dd37991545c313fd149107e9c" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> PluralFormat::getDynamicClassID </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>ICU "poor man's RTTI", returns a UClassID for the actual class. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002893">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

<p>Implements <a class="el" href="classFormat.html#ac961d410d174518e5a3ebb8bbef45cd7">Format</a>.</p>

</div>
</div>
<a class="anchor" id="aa3db9061fda6d0a85b8143f8d7bedcd5"></a><!-- doxytag: member="PluralFormat::getStaticClassID" ref="aa3db9061fda6d0a85b8143f8d7bedcd5" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="utypes_8h.html#a22af10545208a455a6e884008df48e9f">UClassID</a> PluralFormat::getStaticClassID </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>ICU "poor man's RTTI", returns a UClassID for this class. </p>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002892">Stable:</a></b></dt><dd>ICU 4.0</dd></dl>

</div>
</div>
<a class="anchor" id="a6c1ce757f5aa6475aafa63c066f9825b"></a><!-- doxytag: member="PluralFormat::operator!=" ref="a6c1ce757f5aa6475aafa63c066f9825b" args="(const Format &amp;other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> PluralFormat::operator!= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classFormat.html">Format</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return true if another object is semantically unequal to this one. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>the <a class="el" href="classPluralFormat.html">PluralFormat</a> object to be compared with. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if other is semantically unequal to this. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002887">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a4145baa65aaccfbc3ff6a8c34be82213"></a><!-- doxytag: member="PluralFormat::operator=" ref="a4145baa65aaccfbc3ff6a8c34be82213" args="(const PluralFormat &amp;other)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classPluralFormat.html">PluralFormat</a>&amp; PluralFormat::operator= </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classPluralFormat.html">PluralFormat</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Assignment operator. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>the <a class="el" href="classPluralFormat.html">PluralFormat</a> object to copy from. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002885">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

<p>Reimplemented from <a class="el" href="classFormat.html#a7a5276a88c488462eea3a508b71f4d9c">Format</a>.</p>

</div>
</div>
<a class="anchor" id="ae7e12f077b16fb02f069d9830096d96b"></a><!-- doxytag: member="PluralFormat::operator==" ref="ae7e12f077b16fb02f069d9830096d96b" args="(const Format &amp;other) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="umachine_8h.html#a349ef00011f20ccd1d3b424445681aa5">UBool</a> PluralFormat::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classFormat.html">Format</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>other</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return true if another object is semantically equal to this one. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>other</em>&nbsp;</td><td>the <a class="el" href="classPluralFormat.html">PluralFormat</a> object to be compared with. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if other is semantically equal to this. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002886">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a24e62f6a197c2b8e524dd40ce58a89c5"></a><!-- doxytag: member="PluralFormat::parseObject" ref="a24e62f6a197c2b8e524dd40ce58a89c5" args="(const UnicodeString &amp;source, Formattable &amp;result, ParsePosition &amp;parse_pos) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void PluralFormat::parseObject </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>source</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classFormattable.html">Formattable</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classParsePosition.html">ParsePosition</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>parse_pos</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This method is not yet supported by <code><a class="el" href="classPluralFormat.html">PluralFormat</a></code>. </p>
<p>Before calling, set parse_pos.index to the offset you want to start parsing at in the source. After calling, parse_pos.index is the end of the text you parsed. If error occurs, index is unchanged. </p>
<p>When parsing, leading whitespace is discarded (with a successful parse), while trailing whitespace is left as is. </p>
<p>See <a class="el" href="classFormat.html#aa53bea97b986c2f21e5638aa30aa08b7" title="Parse a string to produce an object.">Format::parseObject()</a> for more.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>source</em>&nbsp;</td><td>The string to be parsed into an object. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td><a class="el" href="classFormattable.html" title="Formattable objects can be passed to the Format class or its subclasses for formatting...">Formattable</a> to be set to the parse result. If parse fails, return contents are undefined. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parse_pos</em>&nbsp;</td><td>The position to start parsing at. Upon return this param is set to the position after the last character successfully parsed. If the source is not parsed successfully, this param will remain unchanged. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002891">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

<p>Implements <a class="el" href="classFormat.html#aa53bea97b986c2f21e5638aa30aa08b7">Format</a>.</p>

</div>
</div>
<a class="anchor" id="afe885b1b77e6e4581e61ec7e9ce3d860"></a><!-- doxytag: member="PluralFormat::setLocale" ref="afe885b1b77e6e4581e61ec7e9ce3d860" args="(const Locale &amp;locale, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PluralFormat::setLocale </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classLocale.html">Locale</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>locale</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the locale used by this <code>PluraFormat</code> object. </p>
<p>Note: Calling this method resets this <code>PluraFormat</code> object, i.e., a pattern that was applied previously will be removed, and the <a class="el" href="classNumberFormat.html" title="Abstract base class for all number formats.">NumberFormat</a> is set to the default number format for the locale. The resulting format behaves the same as one constructed from <a class="el" href="classPluralFormat.html#a8756792ec1c169beb733656917a85341">PluralFormat(const Locale&amp; locale, UErrorCode&amp; status)</a>. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>locale</em>&nbsp;</td><td>the <code>locale</code> to use to configure the formatter. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002883">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="ab5d863d4822e3f40366c3fb9946703dc"></a><!-- doxytag: member="PluralFormat::setNumberFormat" ref="ab5d863d4822e3f40366c3fb9946703dc" args="(const NumberFormat *format, UErrorCode &amp;status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void PluralFormat::setNumberFormat </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="classNumberFormat.html">NumberFormat</a> *&nbsp;</td>
          <td class="paramname"> <em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="utypes_8h.html#a3343c1c8a8377277046774691c98d78c">UErrorCode</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>status</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the number format used by this formatter. </p>
<p>You only need to call this if you want a different number format than the default formatter for the locale. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>format</em>&nbsp;</td><td>the number format to use. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>status</em>&nbsp;</td><td>output param set to success/failure code on exit, which must not indicate a failure before the function call. </td></tr>
  </table>
  </dd>
</dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002884">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<a class="anchor" id="a27d0ead83b43868194c44c3abfd423e9"></a><!-- doxytag: member="PluralFormat::toPattern" ref="a27d0ead83b43868194c44c3abfd423e9" args="(UnicodeString &amp;appendTo)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classUnicodeString.html">UnicodeString</a>&amp; PluralFormat::toPattern </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classUnicodeString.html">UnicodeString</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>appendTo</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the pattern from <a class="el" href="classPluralFormat.html#a2e4529df12fd1c2a6f62365a370f5695" title="Sets the pattern used by this plural format.">applyPattern()</a> or constructor(). </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>appendTo</em>&nbsp;</td><td>output parameter to receive result. Result is appended to existing contents. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the <a class="el" href="classUnicodeString.html" title="UnicodeString is a string class that stores Unicode characters directly and provides...">UnicodeString</a> with inserted pattern. </dd></dl>
<dl class="stable"><dt><b><a class="el" href="stable.html#_stable002890">Stable:</a></b></dt><dd>ICU 4.0 </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="plurfmt_8h_source.html">plurfmt.h</a></li>
</ul>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr size="1"/><address style="text-align: right;"><small>Generated on 16 Mar 2010 for ICU 4.4 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>