public boolean equals (Object o) {
        return  (o.getClass().equals(this.getClass()) && (((((AbstractPair)o).component1 == null) &&
                (this.component1 == null)) || ((this.component1 != null) && ((AbstractPair)o).component1.equals(this.component1)))
                && (((((AbstractPair)o).component2 == null) && (this.component2 == null)) || ((this.component2
                != null) && ((AbstractPair)o).component2.equals(this.component2))));
    }