public static Map < String , String > tags ( String ... strings ) { Map < String , String > tags = new HashMap <> ( ) ; for ( int i = 0 ; i < strings . length - 1 ; i += 2 ) { String key = strings [ i ] ; String value = strings [ i + 1 ] ; if ( key != null && value != null ) { tags . put ( key , value ) ; } } return tags ; }
Simple method to create some tags .