hari-om-888 commented on a change in pull request #84:
URL: https://github.com/apache/commons-net/pull/84#discussion_r657808082
##########
File path: src/main/java/org/apache/commons/net/util/SubnetUtils.java
##########
@@ -331,6 +331,33 @@ public SubnetUtils(final String address, final String
mask) {
this.broadcast = this.network | ~this.netmask;
}
+ /**
+ * Constructor that takes a CIDR-notation string, e.g. "192.168.0.1/16", a
dotted decimal mask and and flag to
+ * return value of {@link SubnetInfo#getAddressCount()}
+ * @param cidrNotation A CIDR-notation string, e.g. "192.168.0.1/16"
+ * @param inclusiveHostCount A boolean value e.g. true
+ * @throws IllegalArgumentException if the parameter is invalid,
+ * i.e. does not match n.n.n.n/m where n=1-3 decimal digits, m = 1-2
decimal digits in range 0-32
+ */
+ public SubnetUtils(final String cidrNotation, final boolean
inclusiveHostCount) {
Review comment:
using constructor overloading and setting inclusiveHost count.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]