public boolean equals(Object obj) {
        if (obj == this) {
            return true;   
        }
        if (obj instanceof ContourEntity && super.equals(obj)) {
            ContourEntity ce = (ContourEntity) obj;
            if (this.index != ce.index) {
                return false;   
            }
            return true;
        }
        return false;