![JAR search and dependency download from the Maven repository](/logo.png)
no.difi.vefa.peppol.common.model.AbstractSimpleIdentifier Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of peppol-common Show documentation
Show all versions of peppol-common Show documentation
Library for lookup in the PEPPOL infrastructure.
The newest version!
/*
* Copyright 2015-2017 Direktoratet for forvaltning og IKT
*
* This source code is subject to dual licensing:
*
*
* Licensed under the EUPL, Version 1.1 or – as soon they
* will be approved by the European Commission - subsequent
* versions of the EUPL (the "Licence");
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
*
* See the Licence for the specific language governing
* permissions and limitations under the Licence.
*/
package no.difi.vefa.peppol.common.model;
import no.difi.vefa.peppol.common.api.SimpleIdentifier;
public abstract class AbstractSimpleIdentifier implements SimpleIdentifier {
protected final String value;
protected AbstractSimpleIdentifier(String value) {
this.value = value == null ? null : value.trim();
}
@Override
public String getIdentifier() {
return value;
}
@Override
public String toString() {
return value;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
AbstractSimpleIdentifier that = (AbstractSimpleIdentifier) o;
return value.equals(that.value);
}
@Override
public int hashCode() {
return value.hashCode();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy