public MongoClient clientForMembers(ServerAddress... seeds){
  List<ServerAddress> addresses=new ArrayList<>();
  for (  ServerAddress seedAddress : seeds) {
    if (seedAddress != null)     addresses.add(seedAddress);
  }
  return clientForMembers(addresses);
}

public MongoClient clientForMembers ( ServerAddress ... seeds ) { List < ServerAddress > addresses = new ArrayList < > ( ) ; for ( ServerAddress seedAddress : seeds ) { if ( seedAddress != null ) addresses . add ( seedAddress ) ; } return clientForMembers ( addresses ) ; }
obtain a client connection to the replica set or cluster . the supplied addresses are used as seeds , and once a connection is established it will discover all of the members .
