@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; }
@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; }
public void removeDescription(String language) { descriptions.remove(language); }
public void setDescription(String language, String description) { if (descriptions == null) { descriptions = new LanguageSpecificTextMap(); } descriptions.setText(language, description); }
public void addDescription(LanguageSpecificText description) { if (descriptions == null) { descriptions = new LanguageSpecificTextMap(); } descriptions.add(description); }
public String getDescription(String language) { return descriptions == null ? null : descriptions.getText(language); }
public void removeLabel(String language) { labels.remove(language); }
public void setLabel(String language, String text) { if (labels == null) { labels = new LanguageSpecificTextMap(); } labels.setText(language, text); }
public void addLabel(LanguageSpecificText label) { if (labels == null) { labels = new LanguageSpecificTextMap(); } labels.add(label); }
public String getLabel(String language) { return labels == null ? null : labels.getText(language); }