All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eu.xenit.apix.translation.PropertyTranslationValue Maven / Gradle / Ivy

There is a newer version: 4.1.2
Show newest version
package eu.xenit.apix.translation;

import eu.xenit.apix.data.QName;
import io.swagger.annotations.ApiModelProperty;

import java.util.Map;

/**
 * Datastructure that represents the translations of a single property its values for a single language. values: The map
 * from property key to translation.
 */
public class PropertyTranslationValue extends TranslationValue {

    @ApiModelProperty(dataType = "Map[string,string]")
    private Map values;

    public PropertyTranslationValue() {
    }

    public PropertyTranslationValue(QName qname, String title, String description, Map values) {
        super(qname, title, description);
        this.values = values;
    }

    @Override
    public String toString() {
        return "PropertyTranslationValue{" +
                super.toString() +
                "values=" + values +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        if (!super.equals(o)) {
            return false;
        }

        PropertyTranslationValue that = (PropertyTranslationValue) o;

        return values != null ? values.equals(that.values) : that.values == null;

    }

    @Override
    public int hashCode() {
        int result = super.hashCode();
        result = 31 * result + (values != null ? values.hashCode() : 0);
        return result;
    }

    public Map getValues() {
        return values;
    }

    public void setValues(Map values) {
        this.values = values;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy