question: private List < Payload > createList ( String marble ) { Queue < Character > marb = new ConcurrentLinkedQueue < > ( ) ; List < Payload > toReturn = new ArrayList < > ( ) ; for ( char c : marble . toCharArray ( ) ) { if ( c != '-' ) { switch ( c ) { case '|' : break ; case '#' : break ; default : if ( argMap != null ) { Map < String , String > tempMap = argMap . get ( c + "" ) ; if ( tempMap == null ) { toReturn . add ( new PayloadImpl ( c + "" , c + "" ) ) ; break ; } List < String > key = new ArrayList < > ( tempMap . keySet ( ) ) ; List < String > value = new ArrayList < > ( tempMap . values ( ) ) ; toReturn . add ( new PayloadImpl ( key . get ( 0 ) , value . get ( 0 ) ) ) ; } else { toReturn . add ( new PayloadImpl ( c + "" , c + "" ) ) ; } break ; } } } return toReturn ; }
target:  This function uses the dictionary and the marble string to create the Observable that specifies the marble behavior. We remove the '-' characters because they don't matter in reactivesocket.