@Test public void testClear() { StaticRoute.Builder b = StaticRoute.builder() .setNextHopIp(Ip.ZERO) .setNextHopInterface(null) .setAdministrativeCost(1) .setMetric(0L) .setTag(0L); _rib.mergeRouteGetDelta( b.setNetwork(Prefix.parse("1.2.3.4/32")).setNonForwarding(true).build()); _rib.mergeRouteGetDelta( b.setNetwork(Prefix.parse("1.2.3.4/31")).setNonForwarding(true).build()); _rib.mergeRouteGetDelta( b.setNetwork(Prefix.parse("1.2.3.4/30")).setNonForwarding(true).build()); _rib.mergeRouteGetDelta( b.setNetwork(Prefix.parse("1.2.3.4/30")).setNonForwarding(false).build()); _rib.mergeRouteGetDelta( b.setNetwork(Prefix.parse("1.2.3.4/8")).setNonForwarding(false).build()); _rib.clear(); assertThat(_rib.getRoutes(), empty()); assertThat(_rib.getTypedRoutes(), empty()); }
public final void clear() { _tree.clear(); _allRoutes = null; }
AbstractRib implements GenericRib<R> { public final void clear() { _tree.clear(); _allRoutes = null; } }
AbstractRib implements GenericRib<R> { public final void clear() { _tree.clear(); _allRoutes = null; } protected  AbstractRib(boolean withBackupRoutes); protected  AbstractRib(); }
AbstractRib implements GenericRib<R> { public final void clear() { _tree.clear(); _allRoutes = null; } 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> { public final void clear() { _tree.clear(); _allRoutes = null; } 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();  }