//----------------------------------------------------------------------- /// <summary> /// Checks if this DecimalStyle is equal to another DecimalStyle. /// </summary> /// <param name="obj"> the object to check, null returns false </param> /// <returns> true if this is equal to the other date </returns> public override bool Equals(Object obj) { if (this == obj) { return(true); } if (obj is DecimalStyle) { DecimalStyle other = (DecimalStyle)obj; return(ZeroDigit_Renamed == other.ZeroDigit_Renamed && PositiveSign_Renamed == other.PositiveSign_Renamed && NegativeSign_Renamed == other.NegativeSign_Renamed && DecimalSeparator_Renamed == other.DecimalSeparator_Renamed); } return(false); }
/// <summary> /// Obtains the DecimalStyle for the specified locale. /// <para> /// This method provides access to locale sensitive decimal style symbols. /// /// </para> /// </summary> /// <param name="locale"> the locale, not null </param> /// <returns> the decimal style, not null </returns> public static DecimalStyle Of(Locale locale) { Objects.RequireNonNull(locale, "locale"); DecimalStyle info = CACHE[locale]; if (info == null) { info = Create(locale); CACHE.PutIfAbsent(locale, info); info = CACHE[locale]; } return(info); }