@Test public void testSameAs_Equal() throws Exception { DENOPTIMEdge eA = new DENOPTIMEdge(0, 1, 0, 0, 1); DENOPTIMEdge eB = new DENOPTIMEdge(0, 1, 0, 0, 1); assertTrue(eA.sameAs(eB, reason)); }
public boolean sameAs(DENOPTIMEdge other, StringBuilder reason) { if (this.getSourceDAP() != other.getSourceDAP()) { reason.append("Different source atom ("+this.getSourceDAP()+":" +other.getSourceDAP()+"); "); return false; } if (this.getTargetDAP() != other.getTargetDAP()) { reason.append("Different target atom ("+this.getTargetDAP()+":" +other.getTargetDAP()+"); "); return false; } if (!this.getSourceReaction().equals(other.getSourceReaction())) { reason.append("Different source APClass (" +this.getSourceReaction()+":" +other.getSourceReaction()+"); "); return false; } if (!this.getTargetReaction().equals(other.getTargetReaction())) { reason.append("Different target APClass (" +this.getTargetReaction()+":" +other.getTargetReaction()+"); "); return false; } if (this.getBondType() != (other.getBondType())) { reason.append("Different bond type ("+this.getBondType()+":" +other.getBondType()+"); "); return false; } return true; }
DENOPTIMEdge implements Serializable { public boolean sameAs(DENOPTIMEdge other, StringBuilder reason) { if (this.getSourceDAP() != other.getSourceDAP()) { reason.append("Different source atom ("+this.getSourceDAP()+":" +other.getSourceDAP()+"); "); return false; } if (this.getTargetDAP() != other.getTargetDAP()) { reason.append("Different target atom ("+this.getTargetDAP()+":" +other.getTargetDAP()+"); "); return false; } if (!this.getSourceReaction().equals(other.getSourceReaction())) { reason.append("Different source APClass (" +this.getSourceReaction()+":" +other.getSourceReaction()+"); "); return false; } if (!this.getTargetReaction().equals(other.getTargetReaction())) { reason.append("Different target APClass (" +this.getTargetReaction()+":" +other.getTargetReaction()+"); "); return false; } if (this.getBondType() != (other.getBondType())) { reason.append("Different bond type ("+this.getBondType()+":" +other.getBondType()+"); "); return false; } return true; } }
DENOPTIMEdge implements Serializable { public boolean sameAs(DENOPTIMEdge other, StringBuilder reason) { if (this.getSourceDAP() != other.getSourceDAP()) { reason.append("Different source atom ("+this.getSourceDAP()+":" +other.getSourceDAP()+"); "); return false; } if (this.getTargetDAP() != other.getTargetDAP()) { reason.append("Different target atom ("+this.getTargetDAP()+":" +other.getTargetDAP()+"); "); return false; } if (!this.getSourceReaction().equals(other.getSourceReaction())) { reason.append("Different source APClass (" +this.getSourceReaction()+":" +other.getSourceReaction()+"); "); return false; } if (!this.getTargetReaction().equals(other.getTargetReaction())) { reason.append("Different target APClass (" +this.getTargetReaction()+":" +other.getTargetReaction()+"); "); return false; } if (this.getBondType() != (other.getBondType())) { reason.append("Different bond type ("+this.getBondType()+":" +other.getBondType()+"); "); return false; } return true; } DENOPTIMEdge(int m_src, int m_trg, int m_srcDAP, int m_trgDAP, 
                                                                    int m_btype); }
DENOPTIMEdge implements Serializable { public boolean sameAs(DENOPTIMEdge other, StringBuilder reason) { if (this.getSourceDAP() != other.getSourceDAP()) { reason.append("Different source atom ("+this.getSourceDAP()+":" +other.getSourceDAP()+"); "); return false; } if (this.getTargetDAP() != other.getTargetDAP()) { reason.append("Different target atom ("+this.getTargetDAP()+":" +other.getTargetDAP()+"); "); return false; } if (!this.getSourceReaction().equals(other.getSourceReaction())) { reason.append("Different source APClass (" +this.getSourceReaction()+":" +other.getSourceReaction()+"); "); return false; } if (!this.getTargetReaction().equals(other.getTargetReaction())) { reason.append("Different target APClass (" +this.getTargetReaction()+":" +other.getTargetReaction()+"); "); return false; } if (this.getBondType() != (other.getBondType())) { reason.append("Different bond type ("+this.getBondType()+":" +other.getBondType()+"); "); return false; } return true; } DENOPTIMEdge(int m_src, int m_trg, int m_srcDAP, int m_trgDAP, 
                                                                    int m_btype); void setSourceVertex(int m_src); void setSourceDAP(int m_srcDAP); void setTargetDAP(int m_trgDAP); void setTargetVertex(int m_trg); void setBondType(int m_btype); int getSourceVertex(); int getSourceDAP(); int getTargetDAP(); int getTargetVertex(); String getSourceReaction(); String getTargetReaction(); void setSourceReaction(String m_rcn); void setTargetReaction(String m_rcn); int getBondType(); boolean sameAs(DENOPTIMEdge other, StringBuilder reason); @Override String toString(); }
DENOPTIMEdge implements Serializable { public boolean sameAs(DENOPTIMEdge other, StringBuilder reason) { if (this.getSourceDAP() != other.getSourceDAP()) { reason.append("Different source atom ("+this.getSourceDAP()+":" +other.getSourceDAP()+"); "); return false; } if (this.getTargetDAP() != other.getTargetDAP()) { reason.append("Different target atom ("+this.getTargetDAP()+":" +other.getTargetDAP()+"); "); return false; } if (!this.getSourceReaction().equals(other.getSourceReaction())) { reason.append("Different source APClass (" +this.getSourceReaction()+":" +other.getSourceReaction()+"); "); return false; } if (!this.getTargetReaction().equals(other.getTargetReaction())) { reason.append("Different target APClass (" +this.getTargetReaction()+":" +other.getTargetReaction()+"); "); return false; } if (this.getBondType() != (other.getBondType())) { reason.append("Different bond type ("+this.getBondType()+":" +other.getBondType()+"); "); return false; } return true; } DENOPTIMEdge(int m_src, int m_trg, int m_srcDAP, int m_trgDAP, 
                                                                    int m_btype); void setSourceVertex(int m_src); void setSourceDAP(int m_srcDAP); void setTargetDAP(int m_trgDAP); void setTargetVertex(int m_trg); void setBondType(int m_btype); int getSourceVertex(); int getSourceDAP(); int getTargetDAP(); int getTargetVertex(); String getSourceReaction(); String getTargetReaction(); void setSourceReaction(String m_rcn); void setTargetReaction(String m_rcn); int getBondType(); boolean sameAs(DENOPTIMEdge other, StringBuilder reason); @Override String toString();  }