@Test public void testIsPrefix() { Prefix p1 = Prefix.strict("192.0.2.0/24"); Prefix p2 = Prefix.strict("192.0.2.0/32"); Prefix p3 = Prefix.strict("192.0.3.0/24"); assertThat(_bddPrefix.isPrefix(p1), equalTo(_bddPrefix.isPrefix(p1))); assertFalse(_bddPrefix.isPrefix(p1).andSat(_bddPrefix.isPrefix(p2))); assertFalse(_bddPrefix.isPrefix(p1).andSat(_bddPrefix.isPrefix(p3))); assertThat(_bddPrefix.isPrefix(p2), equalTo(_bddPrefix.isPrefix(p2))); assertFalse(_bddPrefix.isPrefix(p2).andSat(_bddPrefix.isPrefix(p3))); assertThat(_bddPrefix.isPrefix(p3), equalTo(_bddPrefix.isPrefix(p3))); }
public @Nonnull BDD isPrefix(Prefix prefix) { return firstBitsEqual(prefix.getStartIp(), prefix.getPrefixLength()) .and(_prefixLength.value(prefix.getPrefixLength())); }
BDDPrefix { public @Nonnull BDD isPrefix(Prefix prefix) { return firstBitsEqual(prefix.getStartIp(), prefix.getPrefixLength()) .and(_prefixLength.value(prefix.getPrefixLength())); } }
BDDPrefix { public @Nonnull BDD isPrefix(Prefix prefix) { return firstBitsEqual(prefix.getStartIp(), prefix.getPrefixLength()) .and(_prefixLength.value(prefix.getPrefixLength())); } BDDPrefix(BDDInteger ip, BDDInteger prefixLength); }
BDDPrefix { public @Nonnull BDD isPrefix(Prefix prefix) { return firstBitsEqual(prefix.getStartIp(), prefix.getPrefixLength()) .and(_prefixLength.value(prefix.getPrefixLength())); } BDDPrefix(BDDInteger ip, BDDInteger prefixLength); @Override boolean equals(Object o); @Override int hashCode(); @Nonnull BDDFactory getFactory(); @Nonnull BDDInteger getIp(); @Nonnull BDDInteger getPrefixLength(); @Nonnull BDD inPrefixRange(PrefixRange prefixRange); @Nonnull BDD isPrefix(Prefix prefix); @Nonnull BDD permittedByRouteFilterList(RouteFilterList routeFilterList); }
BDDPrefix { public @Nonnull BDD isPrefix(Prefix prefix) { return firstBitsEqual(prefix.getStartIp(), prefix.getPrefixLength()) .and(_prefixLength.value(prefix.getPrefixLength())); } BDDPrefix(BDDInteger ip, BDDInteger prefixLength); @Override boolean equals(Object o); @Override int hashCode(); @Nonnull BDDFactory getFactory(); @Nonnull BDDInteger getIp(); @Nonnull BDDInteger getPrefixLength(); @Nonnull BDD inPrefixRange(PrefixRange prefixRange); @Nonnull BDD isPrefix(Prefix prefix); @Nonnull BDD permittedByRouteFilterList(RouteFilterList routeFilterList);  }