private IPv6AddressRange findFreeRangeAfter ( IPv6Network network ) { for ( IPv6AddressRange freeRange : freeRanges ) { if ( freeRange . getFirst ( ) . subtract ( 1 ) . equals ( network . getLast ( ) ) ) { return freeRange ; } } // not found return null ; }
Private helper method to find the free range just after the given address .