@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (!(obj instanceof Locale))   return false;
  BaseLocale otherBase=((Locale)obj).baseLocale;
  if (!baseLocale.equals(otherBase)) {
    return false;
  }
  if (localeExtensions == null) {
    return ((Locale)obj).localeExtensions == null;
  }
  return localeExtensions.equals(((Locale)obj).localeExtensions);
}

@ Override public boolean equals ( Object obj ) { if ( this == obj ) return true ; if ( ! ( obj instanceof Locale ) ) return false ; BaseLocale otherBase = ( ( Locale ) obj ) . baseLocale ; if ( ! baseLocale . equals ( otherBase ) ) { return false ; } if ( localeExtensions == null ) { return ( ( Locale ) obj ) . localeExtensions == null ; } return localeExtensions . equals ( ( ( Locale ) obj ) . localeExtensions ) ; }
returns true if this locale is equal to another object . a locale is deemed equal to another locale with identical language , script , country , variant and extensions , and unequal to all other objects .
