@Override
    public boolean equals(Object anObject) {
        if (this == anObject) return true;
        if (anObject == null || getClass() != anObject.getClass()) return false;

        Element element = (Element) anObject;

        if (emptyElementTag != element.emptyElementTag) return false;
        if (!attributeNames.equals(element.attributeNames)) return false;
        if (!name.equals(element.name)) return false;
        for(String an : attributeNames) {
            if(! this.attributeValue(an).equals(element.attributeValue(an))) {
                return false;
            }
        }

        return true;
    }