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

de.sstoehr.pustefix.i18n.model.Locale Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
package de.sstoehr.pustefix.i18n.model;

public class Locale {

    private final String localeId;

    public Locale(final String localeId) {
        if (localeId == null) {
            throw new IllegalArgumentException("localeId has to be specified");
        }
        this.localeId = localeId;
    }

    public String getLocaleId() {
        return localeId;
    }

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

        Locale locale = (Locale) o;

        if (!localeId.equals(locale.localeId)) {
            return false;
        }

        return true;
    }

    @Override
    public int hashCode() {
        return localeId.hashCode();
    }

    public String toString() {
        return localeId;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy