Example #1
0
 @Override
 public int hashCode() {
   final int prime = 31;
   int result = 1;
   result = prime * result + ((descriptions == null) ? 0 : descriptions.hashCode());
   result = prime * result + ((labels == null) ? 0 : labels.hashCode());
   result = prime * result + ((name == null) ? 0 : name.hashCode());
   return result;
 }
Example #2
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   CodeListLevel other = (CodeListLevel) obj;
   if (descriptions == null) {
     if (other.descriptions != null) return false;
   } else if (!descriptions.equals(other.descriptions)) return false;
   if (labels == null) {
     if (other.labels != null) return false;
   } else if (!labels.equals(other.labels)) return false;
   if (name == null) {
     if (other.name != null) return false;
   } else if (!name.equals(other.name)) return false;
   return true;
 }
Example #3
0
 public void removeDescription(String language) {
   descriptions.remove(language);
 }
Example #4
0
 public void setDescription(String language, String description) {
   if (descriptions == null) {
     descriptions = new LanguageSpecificTextMap();
   }
   descriptions.setText(language, description);
 }
Example #5
0
 public void addDescription(LanguageSpecificText description) {
   if (descriptions == null) {
     descriptions = new LanguageSpecificTextMap();
   }
   descriptions.add(description);
 }
Example #6
0
 public String getDescription(String language) {
   return descriptions == null ? null : descriptions.getText(language);
 }
Example #7
0
 public void removeLabel(String language) {
   labels.remove(language);
 }
Example #8
0
 public void setLabel(String language, String text) {
   if (labels == null) {
     labels = new LanguageSpecificTextMap();
   }
   labels.setText(language, text);
 }
Example #9
0
 public void addLabel(LanguageSpecificText label) {
   if (labels == null) {
     labels = new LanguageSpecificTextMap();
   }
   labels.add(label);
 }
Example #10
0
 public String getLabel(String language) {
   return labels == null ? null : labels.getText(language);
 }