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

net.n2oapp.framework.api.N2oNamespace Maven / Gradle / Ivy

There is a newer version: 7.28.2
Show newest version
package net.n2oapp.framework.api;

import org.jdom2.Namespace;

import java.io.Serializable;

public class N2oNamespace implements Serializable {

    private String prefix;
    private String uri;

    public N2oNamespace(Namespace namespace) {
        this.prefix = namespace.getPrefix();
        this.uri = namespace.getURI();
    }

    public String getPrefix() {
        return prefix;
    }

    public void setPrefix(String prefix) {
        this.prefix = prefix;
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    @Override
    public boolean equals(Object ob) {
        if (this == ob) {
            return true;
        }
        if (ob instanceof N2oNamespace) {
            return uri.equals(((N2oNamespace)ob).getUri());
        }
        return false;
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy