Constructor for an instance of RangedSet from an instance of either IPv4CidrRange or IPv6CidrRange
Throws an exception if first IP number is not less than given last IP number
Performs a subtraction operation, where the passed range is removed from the original range.
The return range from the subtraction operation could be a single or multiple ranges
Returns the first IP number in the range
Returns the last IP number in the range
Returns the size, which is the number of IP numbers in the range.
Check if this range can be converted to a CIDR range.
Checks if this range is consecutive with another range.
This means if the two ranges can be placed side by side, without any gap. Hence Equal or ranges contained inside one another, or overlapping ranges are not considered as consecutive.
Checks of this range overlaps with a given other range.
This means it checks if part of a range is part of another range without being totally contained in the other range. Hence Equal or ranges contained inside one another are not considered as overlapping.
Optional
count: numberReturns a sub range of a given size from this range.
offset from this range where the subrange should begin
the size of the range
Converts an instance of range to an instance of CIDR range
Converts to a string representation of the range in the form of:
Static
fromConvenience method for constructing an instance of RangedSet from an instance of either IPv4CidrRange or IPv6CidrRange
Static
fromStatic
fromConvenience method for constructing an instance of RangedSet from a single IP number.
The IP number, either IPv4 or IPv6 to construct the range from.
Represents a continuous segment of either IPv4 or IPv6 numbers without adhering to classless inter-domain routing scheme for allocating IP addresses.