@Test public void testEquals() throws Exception { assertThat(ospfLsdb.equals(new OspfLsdbImpl(new OspfAreaImpl())), is(false)); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OspfLsdbImpl that = (OspfLsdbImpl) o; return Objects.equal(routerLsas.size(), that.routerLsas.size()) && Objects.equal(networkLsas.size(), that.networkLsas.size()) && Objects.equal(summaryLsas.size(), that.summaryLsas.size()) && Objects.equal(asbrSummaryLSAs.size(), that.asbrSummaryLSAs.size()) && Objects.equal(lsdbAge, that.lsdbAge) && Objects.equal(routerLsaSeqNo, that.routerLsaSeqNo) && Objects.equal(networkLsaSeqNo, that.networkLsaSeqNo); }
OspfLsdbImpl implements OspfLsdb { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OspfLsdbImpl that = (OspfLsdbImpl) o; return Objects.equal(routerLsas.size(), that.routerLsas.size()) && Objects.equal(networkLsas.size(), that.networkLsas.size()) && Objects.equal(summaryLsas.size(), that.summaryLsas.size()) && Objects.equal(asbrSummaryLSAs.size(), that.asbrSummaryLSAs.size()) && Objects.equal(lsdbAge, that.lsdbAge) && Objects.equal(routerLsaSeqNo, that.routerLsaSeqNo) && Objects.equal(networkLsaSeqNo, that.networkLsaSeqNo); } }
OspfLsdbImpl implements OspfLsdb { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OspfLsdbImpl that = (OspfLsdbImpl) o; return Objects.equal(routerLsas.size(), that.routerLsas.size()) && Objects.equal(networkLsas.size(), that.networkLsas.size()) && Objects.equal(summaryLsas.size(), that.summaryLsas.size()) && Objects.equal(asbrSummaryLSAs.size(), that.asbrSummaryLSAs.size()) && Objects.equal(lsdbAge, that.lsdbAge) && Objects.equal(routerLsaSeqNo, that.routerLsaSeqNo) && Objects.equal(networkLsaSeqNo, that.networkLsaSeqNo); } OspfLsdbImpl(OspfArea ospfArea); }
OspfLsdbImpl implements OspfLsdb { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OspfLsdbImpl that = (OspfLsdbImpl) o; return Objects.equal(routerLsas.size(), that.routerLsas.size()) && Objects.equal(networkLsas.size(), that.networkLsas.size()) && Objects.equal(summaryLsas.size(), that.summaryLsas.size()) && Objects.equal(asbrSummaryLSAs.size(), that.asbrSummaryLSAs.size()) && Objects.equal(lsdbAge, that.lsdbAge) && Objects.equal(routerLsaSeqNo, that.routerLsaSeqNo) && Objects.equal(networkLsaSeqNo, that.networkLsaSeqNo); } OspfLsdbImpl(OspfArea ospfArea); @Override boolean equals(Object o); @Override int hashCode(); void initializeDb(); List getAllLsaHeaders(boolean excludeMaxAgeLsa, boolean isOpaqueCapable); String getLsaKey(LsaHeader lsaHeader); LsaWrapper lsaLookup(LsaHeader lsaHeader); LsaWrapper findLsa(int lsType, String lsaKey); boolean addLsa(LsaHeader newLsa, boolean isSelfOriginated, OspfInterface ospfInterface); void addLsaToMaxAgeBin(String key, Object wrapper); void removeLsaFromBin(Object lsaWrapper); String isNewerOrSameLsa(LsaHeader lsa1, LsaHeader lsa2); long getLsSequenceNumber(OspfLsaType lsaType); void deleteLsa(LsaHeader lsaHeader); void setRouterLsaSeqNo(long routerLsaSeqNo); void setNetworkLsaSeqNo(long networkLsaSeqNo); }
OspfLsdbImpl implements OspfLsdb { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OspfLsdbImpl that = (OspfLsdbImpl) o; return Objects.equal(routerLsas.size(), that.routerLsas.size()) && Objects.equal(networkLsas.size(), that.networkLsas.size()) && Objects.equal(summaryLsas.size(), that.summaryLsas.size()) && Objects.equal(asbrSummaryLSAs.size(), that.asbrSummaryLSAs.size()) && Objects.equal(lsdbAge, that.lsdbAge) && Objects.equal(routerLsaSeqNo, that.routerLsaSeqNo) && Objects.equal(networkLsaSeqNo, that.networkLsaSeqNo); } OspfLsdbImpl(OspfArea ospfArea); @Override boolean equals(Object o); @Override int hashCode(); void initializeDb(); List getAllLsaHeaders(boolean excludeMaxAgeLsa, boolean isOpaqueCapable); String getLsaKey(LsaHeader lsaHeader); LsaWrapper lsaLookup(LsaHeader lsaHeader); LsaWrapper findLsa(int lsType, String lsaKey); boolean addLsa(LsaHeader newLsa, boolean isSelfOriginated, OspfInterface ospfInterface); void addLsaToMaxAgeBin(String key, Object wrapper); void removeLsaFromBin(Object lsaWrapper); String isNewerOrSameLsa(LsaHeader lsa1, LsaHeader lsa2); long getLsSequenceNumber(OspfLsaType lsaType); void deleteLsa(LsaHeader lsaHeader); void setRouterLsaSeqNo(long routerLsaSeqNo); void setNetworkLsaSeqNo(long networkLsaSeqNo);  }