private ImmutableNode mapToNode ( final Builder builder , final Map < String , Object > map ) { for ( final Map . Entry < String , Object > entry : map . entrySet ( ) ) { final String key = entry . getKey ( ) ; final Object value = entry . getValue ( ) ; if ( value instanceof List ) { // For a list, add each list item as a child of this node. for ( final Object item : ( List ) value ) { addChildNode ( builder , key , item ) ; } } else { // Otherwise, add the value as a child of this node. addChildNode ( builder , key , value ) ; } } return builder . create ( ) ; }
Creates a node for the specified map .