private static String buildKey ( Set < String > variables ) { return variables . stream ( ) . sorted ( ) . collect ( Collectors . joining ( ", " ) ) ; }
Sort the set of variables and join to a comma - delimited string .