Java library for handling IP addresses and subnets, both IPv4 and IPv6
longestPrefixMatch
and longestPrefixMatchNode
methods in AddressTrie
, AddressTrieMap
and AddressTrieSet
, for more efficient matching without using the linked list from elementsContaining
toSegmentedBinaryString
0X
and binary 0B
mergeToPrefixBlocks
and mergeToSequentialBlocks
, also resulting in a different ordering of the result, sorted by lower value. The old ordering remains attainable with the comparator IPAddressSegmentSeries.getPrefixLenComparator
asNewTrie
to TrieNode
to create a new trie which is a copy of the sub-trie with the node as rootIPAddressSeqRange.extend(IPAddressRange)
to extend ranges more efficientlyIPAddress.applyToBounds
to use covering and spanning methods with multiple addresses or subnets, not just twoIPAddressString.prefixContains(IPAddressString)
for quick prefix-based containment checksprefixEquals
in IPAddressString
vs IPAddress
with addresses that have no prefix lengthIPAddressString.prefixEquals
involving prefix not on segment boundaryspanWithPrefixBlocks
not splitting up subnets with multiple prefix blocksallowsReverseRange
, also added missing allowBase85
Fixes reversed sub-node order with trie block size iterator
This version introduces address tries, associative address tries, address sets backed by address tries, and maps backed by associative address tries
Minor fixes to IPv4/v6 conversions 6 to 4, isatap, and embedded address extraction.
This version introduces methods for Java 8 functional-style operations.
stream
, prefixStream
, prefixStream(int prefixLength)
, prefixBlockStream
, prefixBlockStream(int prefixLength)
, blockStream(int segmentCount)
, sequentialBlockStream
, segmentsStream
spliterator
, prefixSpliterator
, prefixSpliterator(int prefixLength)
, prefixBlockSpliterator
, prefixBlockSpliterator(int prefixLength)
, blockSpliterator(int segmentCount)
, sequentialBlockSpliterator
, segmentsSpliterator
AddressComponentRange
:
<T extends AddressComponent> Stream<T> stream(Function<T, Stream<? extends T>> addrStreamFunc, T ...components)
<T extends AddressComponent> Stream<T> stream(Function<T, Stream<? extends T>> addrStreamFunc, Collection<? extends T> components)
coverWithPrefixBlock
method to find single covering prefix block, the smallest prefix block covering two subnets or addressesIPAddressString
and HostName
parsed mask access through getMask
methodIPAddressString
instances with masksIPAddressString.getDivisionGrouping
mergeToPrefixBlocks
exception on /1 prefix blocksMostly parsing and masking improvements.