@Test public void testVisitIpSpaceReference_true() { Ip ip1 = Ip.parse("1.1.1.1"); Ip ip2 = Ip.parse("2.2.2.2"); assertTrue(containsIp(ip1).visitIpSpaceReference(new IpSpaceReference(IP_SPACE_NAME))); assertFalse(containsIp(ip2).visitIpSpaceReference(new IpSpaceReference(IP_SPACE_NAME))); assertFalse(containsIp(ip1).visitIpSpaceReference(new IpSpaceReference("missing ipSpace"))); }
@Override public Boolean visitIpSpaceReference(IpSpaceReference ipSpaceReference) { IpSpace ipSpace = _namedIpSpaces.get(ipSpaceReference.getName()); if (ipSpace == null) { return false; } return ipSpace.accept(this); }
IpSpaceContainsIp extends AbstractIpSpaceContainsIp { @Override public Boolean visitIpSpaceReference(IpSpaceReference ipSpaceReference) { IpSpace ipSpace = _namedIpSpaces.get(ipSpaceReference.getName()); if (ipSpace == null) { return false; } return ipSpace.accept(this); } }
IpSpaceContainsIp extends AbstractIpSpaceContainsIp { @Override public Boolean visitIpSpaceReference(IpSpaceReference ipSpaceReference) { IpSpace ipSpace = _namedIpSpaces.get(ipSpaceReference.getName()); if (ipSpace == null) { return false; } return ipSpace.accept(this); } IpSpaceContainsIp(Ip ip, Map<String, IpSpace> namedIpSpaces); }
IpSpaceContainsIp extends AbstractIpSpaceContainsIp { @Override public Boolean visitIpSpaceReference(IpSpaceReference ipSpaceReference) { IpSpace ipSpace = _namedIpSpaces.get(ipSpaceReference.getName()); if (ipSpace == null) { return false; } return ipSpace.accept(this); } IpSpaceContainsIp(Ip ip, Map<String, IpSpace> namedIpSpaces); @Override Boolean visitIpSpaceReference(IpSpaceReference ipSpaceReference); }
IpSpaceContainsIp extends AbstractIpSpaceContainsIp { @Override public Boolean visitIpSpaceReference(IpSpaceReference ipSpaceReference) { IpSpace ipSpace = _namedIpSpaces.get(ipSpaceReference.getName()); if (ipSpace == null) { return false; } return ipSpace.accept(this); } IpSpaceContainsIp(Ip ip, Map<String, IpSpace> namedIpSpaces); @Override Boolean visitIpSpaceReference(IpSpaceReference ipSpaceReference);  }