public static ConnectivityGrid ConnectivityGridFactory(int key,double maxRange){
  if (gridobjects.containsKey((Integer)key)) {
    return (ConnectivityGrid)gridobjects.get((Integer)key);
  }
 else {
    ConnectivityGrid newgrid=new ConnectivityGrid((int)Math.ceil(maxRange * cellSizeMultiplier));
    gridobjects.put((Integer)key,newgrid);
    return newgrid;
  }
}

public static ConnectivityGrid ConnectivityGridFactory ( int key , double maxRange ) { if ( gridobjects . containsKey ( ( Integer ) key ) ) { return ( ConnectivityGrid ) gridobjects . get ( ( Integer ) key ) ; } else { ConnectivityGrid newgrid = new ConnectivityGrid ( ( int ) Math . ceil ( maxRange * cellSizeMultiplier ) ) ; gridobjects . put ( ( Integer ) key , newgrid ) ; return newgrid ; } }
returns a connectivity grid object based on a hash value
