public boolean equals()

in src/main/java/org/apache/ws/commons/schema/XmlSchemaObject.java [59:90]


    public boolean equals(Object what) {
        if (what == this) {
            return true;
        }

        // note: instanceof returns false if its first operand is null
        if (!(what instanceof XmlSchemaObject)) {
            return false;
        }

        XmlSchemaObject xso = (XmlSchemaObject)what;

        if (this.lineNumber != xso.lineNumber) {
            return false;
        }

        if (this.linePosition != xso.linePosition) {
            return false;
        }

        if (this.sourceURI != null) {
            if (!this.sourceURI.equals(xso.sourceURI)) {
                return false;
            }
        } else {
            if (xso.sourceURI != null) {
                return false;
            }
        }

        return true;
    }