package fr.vidal.oss.jaxb.atom.core;

import java.util.Objects;

public class Namespace {

    private final String uri;
    private final String prefix;

    private Namespace(String uri, String prefix) {
        this.uri = uri;
        this.prefix = prefix;
    }

    public static Namespace namespace(String uri, String prefix) {
        return new Namespace(uri, prefix);
    }

    public String uri() {
        return uri;
    }

    public String prefix() {
        return prefix;
    }

    @Override
    public int hashCode() {
        return Objects.hash(uri, prefix);
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        final Namespace other = (Namespace) obj;
        return Objects.equals(this.uri, other.uri) && Objects.equals(this.prefix, other.prefix);
    }
}

@@ -58,16 +58,56 @@
 jects;%0A%0A
+import static java.lang.String.format;%0A%0A
 public c
@@ -982,11 +982,110 @@
 );%0A    %7D
+%0A%0A    @Override%0A    public String toString() %7B%0A        return format(%22%25s (%25s)%22, prefix, uri);%0A    %7D
 %0A%7D%0A

Add toString on Namespace