@Test public void testAclIpSpace() { IpSpace ipSpace = AclIpSpace.builder() .thenRejecting(EVEN_IPS.toIpSpace()) .thenPermitting(Prefix.parse("1.2.3.0/24").toIpSpace()) .build(); assertThat( _ipSpaceRepresentative.getRepresentative(ipSpace), equalTo(Optional.of(Ip.parse("1.2.3.1")))); }
public Optional<Ip> getRepresentative(IpSpace ipSpace) { return _ipSpaceToBDD .getBDDInteger() .getValueSatisfying(_ipSpaceToBDD.visit(ipSpace)) .map(Ip::create); }
IpSpaceRepresentative { public Optional<Ip> getRepresentative(IpSpace ipSpace) { return _ipSpaceToBDD .getBDDInteger() .getValueSatisfying(_ipSpaceToBDD.visit(ipSpace)) .map(Ip::create); } }
IpSpaceRepresentative { public Optional<Ip> getRepresentative(IpSpace ipSpace) { return _ipSpaceToBDD .getBDDInteger() .getValueSatisfying(_ipSpaceToBDD.visit(ipSpace)) .map(Ip::create); } IpSpaceRepresentative(); }
IpSpaceRepresentative { public Optional<Ip> getRepresentative(IpSpace ipSpace) { return _ipSpaceToBDD .getBDDInteger() .getValueSatisfying(_ipSpaceToBDD.visit(ipSpace)) .map(Ip::create); } IpSpaceRepresentative(); Optional<Ip> getRepresentative(IpSpace ipSpace); }
IpSpaceRepresentative { public Optional<Ip> getRepresentative(IpSpace ipSpace) { return _ipSpaceToBDD .getBDDInteger() .getValueSatisfying(_ipSpaceToBDD.visit(ipSpace)) .map(Ip::create); } IpSpaceRepresentative(); Optional<Ip> getRepresentative(IpSpace ipSpace);  }