@Test public void testHasSameRoutes() { AbstractRib<StaticRoute> rib2 = new StaticRib(); assertThat(rib2, equalTo(_rib)); List<StaticRoute> routes = setupOverlappingRoutes(); assertThat(rib2, not(equalTo(_rib))); rib2.mergeRouteGetDelta(routes.get(0)); rib2.mergeRouteGetDelta(routes.get(2)); rib2.mergeRouteGetDelta(routes.get(3)); assertThat(rib2, not(equalTo(_rib))); rib2.mergeRouteGetDelta(routes.get(1)); assertThat(rib2, equalTo(_rib)); }
@Nonnull public RibDelta<R> mergeRouteGetDelta(R route) { RibDelta<R> delta = _tree.mergeRoute(route); addBackupRoute(route); if (!delta.isEmpty()) { _allRoutes = null; } return delta; }
AbstractRib implements GenericRib<R> { @Nonnull public RibDelta<R> mergeRouteGetDelta(R route) { RibDelta<R> delta = _tree.mergeRoute(route); addBackupRoute(route); if (!delta.isEmpty()) { _allRoutes = null; } return delta; } }
AbstractRib implements GenericRib<R> { @Nonnull public RibDelta<R> mergeRouteGetDelta(R route) { RibDelta<R> delta = _tree.mergeRoute(route); addBackupRoute(route); if (!delta.isEmpty()) { _allRoutes = null; } return delta; } protected  AbstractRib(boolean withBackupRoutes); protected  AbstractRib(); }
AbstractRib implements GenericRib<R> { @Nonnull public RibDelta<R> mergeRouteGetDelta(R route) { RibDelta<R> delta = _tree.mergeRoute(route); addBackupRoute(route); if (!delta.isEmpty()) { _allRoutes = null; } return delta; } protected  AbstractRib(boolean withBackupRoutes); protected  AbstractRib(); @Nonnull static RibDelta<U> importRib(
      AbstractRib<U> importingRib, AbstractRib<T> exportingRib); @Nonnull static RibDelta<AnnotatedRoute<U>> importRib(
      AnnotatedRib<U> importingRib, AbstractRib<T> exportingRib, String vrfName); @Nonnull static RibDelta<AnnotatedRoute<U>> importRib(
      AnnotatedRib<U> importingRib, AnnotatedRib<T> exportingRib); final void clear(); @Override @SuppressWarnings("unchecked") final boolean containsRoute(AbstractRouteDecorator route); @Override @Nonnull Set<AbstractRoute> getRoutes(); @Override @Nonnull Set<R> getTypedRoutes(); @Override abstract int comparePreference(R lhs, R rhs); @Override @Nonnull Set<R> longestPrefixMatch(Ip address); @Override @Nonnull Set<R> longestPrefixMatch(Ip address, int maxPrefixLength); @Nonnull RibDelta<R> mergeRouteGetDelta(R route); @Override boolean mergeRoute(R route); @Nonnull RibDelta<R> removeRouteGetDelta(R route, Reason reason); @Nonnull RibDelta<R> removeRouteGetDelta(R route); boolean removeRoute(R route); @Override boolean equals(@Nullable Object other); @Override int hashCode(); }
AbstractRib implements GenericRib<R> { @Nonnull public RibDelta<R> mergeRouteGetDelta(R route) { RibDelta<R> delta = _tree.mergeRoute(route); addBackupRoute(route); if (!delta.isEmpty()) { _allRoutes = null; } return delta; } protected  AbstractRib(boolean withBackupRoutes); protected  AbstractRib(); @Nonnull static RibDelta<U> importRib(
      AbstractRib<U> importingRib, AbstractRib<T> exportingRib); @Nonnull static RibDelta<AnnotatedRoute<U>> importRib(
      AnnotatedRib<U> importingRib, AbstractRib<T> exportingRib, String vrfName); @Nonnull static RibDelta<AnnotatedRoute<U>> importRib(
      AnnotatedRib<U> importingRib, AnnotatedRib<T> exportingRib); final void clear(); @Override @SuppressWarnings("unchecked") final boolean containsRoute(AbstractRouteDecorator route); @Override @Nonnull Set<AbstractRoute> getRoutes(); @Override @Nonnull Set<R> getTypedRoutes(); @Override abstract int comparePreference(R lhs, R rhs); @Override @Nonnull Set<R> longestPrefixMatch(Ip address); @Override @Nonnull Set<R> longestPrefixMatch(Ip address, int maxPrefixLength); @Nonnull RibDelta<R> mergeRouteGetDelta(R route); @Override boolean mergeRoute(R route); @Nonnull RibDelta<R> removeRouteGetDelta(R route, Reason reason); @Nonnull RibDelta<R> removeRouteGetDelta(R route); boolean removeRoute(R route); @Override boolean equals(@Nullable Object other); @Override int hashCode();  }