Пример #1
0
 @Override
 public String toString() {
   return Objects.toStringHelper(this)
       .add("id", id)
       .add("code", countryCodeDescription.getCode())
       .add("name", countryCodeDescription.getDescription())
       .toString();
 }
Пример #2
0
 @Override
 public int compareTo(Country o) {
   int codeDiff = countryCodeDescription.getCode().compareTo(o.countryCodeDescription.getCode());
   if (codeDiff != 0) {
     return codeDiff;
   }
   return countryCodeDescription
       .getDescription()
       .compareTo(o.countryCodeDescription.getDescription());
 }
 @Override
 public String print(CodeDescription<String> codeDescription, Locale locale) {
   return codeDescription.getCode();
 }
Пример #4
0
 public void setName(String name) {
   countryCodeDescription.setDescription(name);
 }
Пример #5
0
 public String getName() {
   return countryCodeDescription.getDescription();
 }
Пример #6
0
 public void setCode(String code) {
   countryCodeDescription.setCode(code);
 }