public boolean equals()

in geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/NewCookie.java [73:148]


    public boolean equals(java.lang.Object obj) {
        if (this == obj) {
            return true;
        }

        if (obj == null) {
            return false;
        }

        // note that this must be a NewCookie exactly
        if (getClass() != obj.getClass()) {
            return false;
        }

        NewCookie other = (NewCookie)obj;
        if (!getName().equals(other.getName())) {
            return false;
        }

        if (getVersion() != other.getVersion()) {
            return false;
        }

        if (isSecure != other.isSecure) {
            return false;
        }

        if (maxAge != other.maxAge) {
            return false;
        }

        String value = getValue();
        if (value == null) {
            if (other.getValue() != null) {
                return false;
            }
        } else {
            if (!value.equals(other.getValue())) {
                return false;
            }
        }

        String path = getPath();
        if (path == null) {
            if (other.getPath() != null) {
                return false;
            }
        } else {
            if (!path.equals(other.getPath())) {
                return false;
            }
        }

        String domain = getDomain();
        if (domain == null) {
            if (other.getDomain() != null) {
                return false;
            }
        } else {
            if (!domain.equals(other.getDomain())) {
                return false;
            }
        }

        if (comment == null) {
            if (other.comment != null) {
                return false;
            }
        } else {
            if (!comment.equals(other.comment)) {
                return false;
            }
        }

        return true;
    }