public IPv6AddressSegment join ( IPv6AddressCreator creator , IPv4AddressSegment low ) throws IncompatibleAddressException { int shift = IPv4Address . BITS_PER_SEGMENT ; Integer prefix = getJoinedSegmentPrefixLength ( shift , getSegmentPrefixLength ( ) , low . getSegmentPrefixLength ( ) ) ; if ( isMultiple ( ) ) { //if the high segment has a range, the low segment must match the full range, //otherwise it is not possible to create an equivalent range when joining if ( ! low . isFullRange ( ) ) { throw new IncompatibleAddressException ( this , low , "ipaddress.error.invalidMixedRange" ) ; } } return creator . createSegment ( ( getSegmentValue ( ) << shift ) | low . getSegmentValue ( ) , ( getUpperSegmentValue ( ) << shift ) | low . getUpperSegmentValue ( ) , prefix ) ; }
Joins with another IPv4 segment to produce a IPv6 segment .