question: public static void onDatabase ( MongoClient client , String dbName , Consumer < MongoDatabase > dbOperation ) { if ( contains ( client . listDatabaseNames ( ) , dbName ) ) { dbOperation . accept ( client . getDatabase ( dbName ) ) ; } }
target:  Perform the given operation on the database with the given name, only if that database exists.