public static WeightedAddress[] resizeArray(WeightedAddress[] array,int size){
  WeightedAddress[] result=new WeightedAddress[size];
  System.arraycopy(array,0,result,0,array.length);
  for (int i=array.length; i < result.length; i++)   result[i]=new WeightedAddress();
  return result;
}

public static WeightedAddress [ ] resizeArray ( WeightedAddress [ ] array , int size ) { WeightedAddress [ ] result = new WeightedAddress [ size ] ; System . arraycopy ( array , 0 , result , 0 , array . length ) ; for ( int i = array . length ; i < result . length ; i ++ ) result [ i ] = new WeightedAddress ( ) ; return result ; }
utility for resizing an array of weighted addresses
