- Abstract classes were replaced with lightweight interfaces for more flexibility. This shouldn't affect most users, but it does break serialization compatibility
- IPv4Subnet mask length is now an
int
instead of an annoyingbyte
, making it consistent with the IPv6 counterpart - Removed deprecated
between
function - Length type of ranges (
Long
for IPv4,BigInteger
for IPv6) is now a generic parameter of theIPRange
/IPSubnet
interface. This should make writing generic code that usesIPRange
orIPSubnet
easier without affecting users of the concrete classes. - New methods in
IPv4Address
,IPv6Address
:- Logical operators:
and
,not
,or
,xor
toRange
,toSubnet
distanceTo
,isAdjacentTo
- Logical operators:
- New methods in
IPv4Range
,IPv6Range
,IPv4Subnet
,IPv6Subnet
:- Range extension methods:
withFirst
,withLast
intLength
merge
for merging several ranges into a minimal list of non-overlapping ranges
- Range extension methods:
- Range and Subnet instances that contain the same addresses are now equal to each other despite being different classes.
- The deprecated the
between()
range builder, replaced it with a newparse()
function that accepts subnets (1.2.3.0/24) , ranges (1.2.3.4-1.2.3.5) and single addresses (1.2.3.4).
- Initial release