@Test public void testLongestPrefixMatchConstrained() { List<StaticRoute> routes = setupOverlappingRoutes(); Set<StaticRoute> match = _rib.longestPrefixMatch(Ip.parse("10.1.1.1"), 8); assertThat(match, contains(routes.get(0))); }
@Override public @Nonnull Set<R> longestPrefixMatch(Ip address) { return longestPrefixMatch(address, Prefix.MAX_PREFIX_LENGTH); }
AbstractRib implements GenericRib<R> { @Override public @Nonnull Set<R> longestPrefixMatch(Ip address) { return longestPrefixMatch(address, Prefix.MAX_PREFIX_LENGTH); } }
AbstractRib implements GenericRib<R> { @Override public @Nonnull Set<R> longestPrefixMatch(Ip address) { return longestPrefixMatch(address, Prefix.MAX_PREFIX_LENGTH); } protected  AbstractRib(boolean withBackupRoutes); protected  AbstractRib(); }
AbstractRib implements GenericRib<R> { @Override public @Nonnull Set<R> longestPrefixMatch(Ip address) { return longestPrefixMatch(address, Prefix.MAX_PREFIX_LENGTH); } 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> { @Override public @Nonnull Set<R> longestPrefixMatch(Ip address) { return longestPrefixMatch(address, Prefix.MAX_PREFIX_LENGTH); } 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();  }