@ SuppressWarnings ( "unchecked" ) public static BasicDBObjectBuilder start ( final Map documentAsMap ) { BasicDBObjectBuilder builder = new BasicDBObjectBuilder ( ) ; Iterator < Map . Entry > i = documentAsMap . entrySet ( ) . iterator ( ) ; while ( i . hasNext ( ) ) { Map . Entry entry = i . next ( ) ; builder . add ( entry . getKey ( ) . toString ( ) , entry . getValue ( ) ) ; } return builder ; }
Creates an object builder from an existing map of key value pairs .