@Test public void authorised() { assertTrue(underTest.isAuthorised(Arrays.asList("1.2.3.4/32"), "1.2.3.4")); assertTrue(underTest.isAuthorised(Arrays.asList("10.0.0.0/8"), "10.255.255.255")); assertTrue(underTest.isAuthorised(Arrays.asList("10.0.0.0/8"), "10.0.0.0")); }
public boolean isAuthorised(List<String> cidrBlocks, String address) { return any(cache.getUnchecked(cidrBlocks), cidrBlock -> cidrBlock.isInRange(address)); }
CidrBlockAuthorisation { public boolean isAuthorised(List<String> cidrBlocks, String address) { return any(cache.getUnchecked(cidrBlocks), cidrBlock -> cidrBlock.isInRange(address)); } }
CidrBlockAuthorisation { public boolean isAuthorised(List<String> cidrBlocks, String address) { return any(cache.getUnchecked(cidrBlocks), cidrBlock -> cidrBlock.isInRange(address)); } CidrBlockAuthorisation(); }
CidrBlockAuthorisation { public boolean isAuthorised(List<String> cidrBlocks, String address) { return any(cache.getUnchecked(cidrBlocks), cidrBlock -> cidrBlock.isInRange(address)); } CidrBlockAuthorisation(); boolean isAuthorised(List<String> cidrBlocks, String address); }
CidrBlockAuthorisation { public boolean isAuthorised(List<String> cidrBlocks, String address) { return any(cache.getUnchecked(cidrBlocks), cidrBlock -> cidrBlock.isInRange(address)); } CidrBlockAuthorisation(); boolean isAuthorised(List<String> cidrBlocks, String address);  }