@Test public void testMatch() { IPAddressRange r = new IPAddressRange("1.2.0.0/16"); assertTrue(r.match("1.2.3.4")); assertFalse(r.match("1.1.3.4")); assertTrue(new IPAddressRange("10.10.100.80/32").match("10.10.100.80")); }
public boolean match(String address) { if( ! SubnetV4Utils.isAddress(address)) return false; SubnetV4Utils su = new SubnetV4Utils(low, size); return su.getInfo().isInRange(address); }
IPAddressRange implements Serializable { public boolean match(String address) { if( ! SubnetV4Utils.isAddress(address)) return false; SubnetV4Utils su = new SubnetV4Utils(low, size); return su.getInfo().isInRange(address); } }
IPAddressRange implements Serializable { public boolean match(String address) { if( ! SubnetV4Utils.isAddress(address)) return false; SubnetV4Utils su = new SubnetV4Utils(low, size); return su.getInfo().isInRange(address); } protected  IPAddressRange();  IPAddressRange(String cidrNotation); }
IPAddressRange implements Serializable { public boolean match(String address) { if( ! SubnetV4Utils.isAddress(address)) return false; SubnetV4Utils su = new SubnetV4Utils(low, size); return su.getInfo().isInRange(address); } protected  IPAddressRange();  IPAddressRange(String cidrNotation); boolean match(String address); boolean match(InetAddress address); boolean match(Inet4Address address); String getAddress(); String getCidrSignature(); Long getLow(); void setLow(Long low); Long getHigh(); void setHigh(Long high); int getSize(); void setSize(int size); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString(); }
IPAddressRange implements Serializable { public boolean match(String address) { if( ! SubnetV4Utils.isAddress(address)) return false; SubnetV4Utils su = new SubnetV4Utils(low, size); return su.getInfo().isInRange(address); } protected  IPAddressRange();  IPAddressRange(String cidrNotation); boolean match(String address); boolean match(InetAddress address); boolean match(Inet4Address address); String getAddress(); String getCidrSignature(); Long getLow(); void setLow(Long low); Long getHigh(); void setHigh(Long high); int getSize(); void setSize(int size); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }