@Test public void testFalseSingleIpAddress() throws IOException { Tuple input = tupleFactory.newTuple(1); Tuple output; String subnet = "127.0.0.1/32"; String ipAddress = "192.168.1.1"; input.set(0, ipAddress); Cidr cidr = new Cidr(subnet); output = cidr.exec(input); assertEquals(output.get(0).toString(), "false"); }
@Override public final Tuple exec(final Tuple input) throws IOException { if (input == null || input.size() != 1 || input.get(0) == null) { return null; } String ipAddress = (String) input.get(0); boolean result = cidrFilter.ipAddressFallsInRange(ipAddress); output = tupleFactory.newTuple(1); output.set(0, result); return output; }
Cidr extends EvalFunc<Tuple> { @Override public final Tuple exec(final Tuple input) throws IOException { if (input == null || input.size() != 1 || input.get(0) == null) { return null; } String ipAddress = (String) input.get(0); boolean result = cidrFilter.ipAddressFallsInRange(ipAddress); output = tupleFactory.newTuple(1); output.set(0, result); return output; } }
Cidr extends EvalFunc<Tuple> { @Override public final Tuple exec(final Tuple input) throws IOException { if (input == null || input.size() != 1 || input.get(0) == null) { return null; } String ipAddress = (String) input.get(0); boolean result = cidrFilter.ipAddressFallsInRange(ipAddress); output = tupleFactory.newTuple(1); output.set(0, result); return output; } Cidr();  Cidr(final String subnetInput); }
Cidr extends EvalFunc<Tuple> { @Override public final Tuple exec(final Tuple input) throws IOException { if (input == null || input.size() != 1 || input.get(0) == null) { return null; } String ipAddress = (String) input.get(0); boolean result = cidrFilter.ipAddressFallsInRange(ipAddress); output = tupleFactory.newTuple(1); output.set(0, result); return output; } Cidr();  Cidr(final String subnetInput); @Override final Tuple exec(final Tuple input); final Schema outputSchema(final Schema input); }
Cidr extends EvalFunc<Tuple> { @Override public final Tuple exec(final Tuple input) throws IOException { if (input == null || input.size() != 1 || input.get(0) == null) { return null; } String ipAddress = (String) input.get(0); boolean result = cidrFilter.ipAddressFallsInRange(ipAddress); output = tupleFactory.newTuple(1); output.set(0, result); return output; } Cidr();  Cidr(final String subnetInput); @Override final Tuple exec(final Tuple input); final Schema outputSchema(final Schema input);  }