Remove IpV4Subnet.main()
- Should run as a test case
This commit is contained in:
parent
54047c69cf
commit
f428853b35
@ -247,24 +247,4 @@ public class IpV4Subnet implements IpSet, Comparable<IpV4Subnet> {
|
|||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Simple test functions
|
|
||||||
*
|
|
||||||
* @param args where args[0] is the netmask (standard or CIDR notation) and optional args[1] is
|
|
||||||
* the inetAddress to test with this IpV4Subnet
|
|
||||||
*/
|
|
||||||
public static void main(String[] args) throws Exception {
|
|
||||||
if (args.length != 0) {
|
|
||||||
IpV4Subnet ipV4Subnet = null;
|
|
||||||
try {
|
|
||||||
ipV4Subnet = new IpV4Subnet(args[0]);
|
|
||||||
} catch (UnknownHostException e) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (args.length > 1) {
|
|
||||||
System.out.println("Is IN: " + args[1] + " " + ipV4Subnet.contains(args[1]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user