public static DataNetwork initNetwork(){
  Random random=new Random(System.currentTimeMillis());
  int id=random.nextInt();
  while (usedIds.contains(id)) {
    id=random.nextInt();
  }
  ;
  DataNetwork net=new DataNetwork();
  usedIds.add(id);
  net.networkID=id;
  return net;
}

public static DataNetwork initNetwork ( ) { Random random = new Random ( System . currentTimeMillis ( ) ) ; int id = random . nextInt ( ) ; while ( usedIds . contains ( id ) ) { id = random . nextInt ( ) ; } ; DataNetwork net = new DataNetwork ( ) ; usedIds . add ( id ) ; net . networkID = id ; return net ; }
create a new network and get an id
