class LocaleBean implements Serializable {

  private static final long serialVersionUID = 1;
  private String country;
  private String language;
  private String variant;

  public LocaleBean() {
  }

  public LocaleBean(Locale l) {
    country = l.getCountry();
    language = l.getLanguage();
    variant = l.getVariant();
  }

  public String getCountry() {
    return country;
  }

  public String getLanguage() {
    return language;
  }

  public String getVariant() {
    return variant;
  }

  public void setCountry(String country) {
    this.country = country;
  }

  public void setLanguage(String language) {
    this.language = language;
  }

  public void setVariant(String variant) {
    this.variant = variant;
  }

  Locale asLocale() {<FILL_FUNCTION_BODY>}

}

    if (language != null) {
      if (country != null) {
        if (variant != null) {
          return new Locale(language, country, variant);
        }
        return new Locale(language, country);
      }
      return new Locale(language);
    }
    return Locale.getDefault();
  
<no_super_class>