private static EquivalentAddressGroup flattenEquivalentAddressGroup ( List < EquivalentAddressGroup > groupList , Attributes attrs ) { List < SocketAddress > addrs = new ArrayList <> ( ) ; for ( EquivalentAddressGroup group : groupList ) { addrs . addAll ( group . getAddresses ( ) ) ; } return new EquivalentAddressGroup ( addrs , attrs ) ; }
Flattens list of EquivalentAddressGroup objects into one EquivalentAddressGroup object .