title: Passing parameters to a function in hashmap value
body: <p>I am having a scenario where I am calling a function present in hashmap value as follows,</p>
  
  <pre><code>  Map&lt;Character, IntSupplier&gt; commands = new HashMap&lt;&gt;();
  
              // Populate commands map
             int number=10;
              commands.put('h', () -&gt; funtion1(number) );
              commands.put('t', () -&gt; funtion1(number) );
  
              // Invoke some command
              char cmd = 'h';
            IntSupplier result=  commands.get(cmd); //How can I pass a parameter over here?
  
  System.out.println(" Return value is "+result.getAsInt());
  </code></pre>
  
  <p>My question is that can I pass the parameter to the function (function1) when getting the hashmap value i.e. when using commands.get(cmd).</p>
  
  <p>Thank you.</p>