// -------- BEGIN ULocale boilerplate -------- /// <summary> /// Return the locale that was used to create this object, or null. This may /// may differ from the locale requested at the time of this object's /// creation. For example, if an object is created for locale /// <tt>en_US_CALIFORNIA</tt>, the actual data may be drawn from <tt>en</tt> /// (the <i>actual</i> locale), and <tt>en_US</tt> may be the most specific /// locale that exists (the <i>valid</i> locale). /// <p> /// Note: This method will be implemented in ICU 3.0; ICU 2.8 contains a /// partial preview implementation. The/// <i>actual</i> locale is returned /// correctly, but the <i>valid</i> locale is not, in most cases. /// </summary> /// /// <param name="type">type of information requested, either<see cref="M:IBM.ICU.Text.ULocale.VALID_LOCALE"/> or<see cref="M:IBM.ICU.Text.ULocale.ACTUAL_LOCALE"/>.</param> /// <returns>the information specified by <i>type</i>, or null if this object /// was not constructed from locale data.</returns> /// <seealso cref="T:IBM.ICU.Text.ULocale"/> /// <seealso cref="M:IBM.ICU.Text.ULocale.VALID_LOCALE"/> /// <seealso cref="M:IBM.ICU.Text.ULocale.ACTUAL_LOCALE"/> /// @draft ICU 2.8 (retain) /// @provisional This API might change or be removed in a future release. public ULocale GetLocale(ULocale.Type type) { return((type == IBM.ICU.Util.ULocale.ACTUAL_LOCALE) ? this.actualLocale : this.validLocale); }
// -------- BEGIN ULocale boilerplate -------- /// <summary> /// Return the locale that was used to create this object, or null. This may /// may differ from the locale requested at the time of this object's /// creation. For example, if an object is created for locale /// <tt>en_US_CALIFORNIA</tt>, the actual data may be drawn from <tt>en</tt> /// (the <i>actual</i> locale), and <tt>en_US</tt> may be the most specific /// locale that exists (the <i>valid</i> locale). /// <p> /// Note: This method will be obsoleted. The implementation is no longer /// locale-specific and so there is no longer a valid or actual locale /// associated with the Currency object. Until it is removed, this method /// will return the root locale. /// </summary> /// /// <param name="type">type of information requested, either<see cref="M:IBM.ICU.Util.ULocale.VALID_LOCALE"/> or<see cref="M:IBM.ICU.Util.ULocale.ACTUAL_LOCALE"/>.</param> /// <returns>the information specified by <i>type</i>, or null if this object /// was not constructed from locale data.</returns> /// <seealso cref="T:IBM.ICU.Util.ULocale"/> /// <seealso cref="M:IBM.ICU.Util.ULocale.VALID_LOCALE"/> /// <seealso cref="M:IBM.ICU.Util.ULocale.ACTUAL_LOCALE"/> /// @obsolete ICU 3.2 to be removed public ULocale GetLocale(ULocale.Type type) { return(IBM.ICU.Util.ULocale.ROOT); }
// -------- BEGIN ULocale boilerplate -------- /// <summary> /// Return the locale that was used to create this object, or null. /// </summary> /// <remarks> /// This may may differ from the locale requested at the time of /// this object's creation. For example, if an object is created /// for locale <tt>en_US_CALIFORNIA</tt>, the actual data may be /// drawn from <tt>en</tt> (the <i>actual</i> locale), and /// <tt>en_US</tt> may be the most specific locale that exists (the /// <i>valid</i> locale). /// <para/> /// Note: This method will be implemented in ICU 3.0; ICU 2.8 /// contains a partial preview implementation. The <i>actual</i> /// locale is returned correctly, but the <i>valid</i> locale is /// not, in most cases. /// </remarks> /// <param name="type"> /// type of information requested, either <see cref="ULocale.VALID_LOCALE"/> /// or <see cref="ULocale.ACTUAL_LOCALE"/>. /// </param> /// <returns> /// the information specified by <i>type</i>, or null if /// this object was not constructed from locale data. /// </returns> /// <seealso cref="ULocale"/> /// <seealso cref="ULocale.VALID_LOCALE"/> /// <seealso cref="ULocale.ACTUAL_LOCALE"/> /// <draft>ICU 2.8 (retain)</draft> /// <provisional>This API might change or be removed in a future release.</provisional> public ULocale GetLocale(ULocale.Type type) { return(type == ULocale.ACTUAL_LOCALE ? this.actualLocale : this.validLocale); }