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

net.oneandone.neberus.model.warning.WarningUrn Maven / Gradle / Ivy

There is a newer version: 4.2.1
Show newest version
package net.oneandone.neberus.model.warning;

import net.oneandone.neberus.model.problem.ProblemUrn;
import java.util.Objects;

/**
 * Adapted from {@link ProblemUrn}.
 */
public class WarningUrn {

    public static final String PREFIX = "urn:warning:ui.";

    private final String urn;

    /**
     * Constructor using urn.
     *
     * @param urn the urn
     */
    public WarningUrn(String urn) {
        this.urn = urn;
    }

    /**
     * Get urn.
     *
     * @return the urn
     */
    public String getUrn() {
        return urn;
    }

    @Override
    public String toString() {
        return urn;
    }

    @Override
    public boolean equals(Object obj) {
        return obj instanceof WarningUrn && Objects.equals(urn, ((WarningUrn) obj).getUrn());
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy