title: Can Java lambdas bind methods to their parameters?
body: <p>How to pass a method as a parameter using lambdas is discussed here:<br>
  <a href="https://stackoverflow.com/questions/2186931/java-pass-method-as-parameter/25005082#25005082">Java Pass Method as Parameter</a></p>
  
  <p>In other languages, namely C++, it is possible to bind a function to it's parameters using Lambdas - discussed here:<br>
  <a href="https://stackoverflow.com/questions/1930903/bind-vs-lambda">Bind Vs Lambda?</a></p>
  
  <p>Is it possible, in Java, to bind a method using lambdas?</p>
  
  <p>If so, how would you accomplish this?</p>
  
  <p>Edit >>>></p>
  
  <p>An example, by request, of what I am generally trying to do:</p>
  
  <p>Be warned, there is pseudo code here.</p>
  
  <pre><code>public class DataView {
  
      private static ArrayList&lt;Float&gt; rectData = new ArrayList&lt;Float&gt;();
      private static ArrayList&lt;Float&gt; textData = new ArrayList&lt;Float&gt;();
  
      DataView(){
  
          //Pseudo Code:
          boundFunction mybind  = boundFunction(functionA, 5, 10);
          boundFunction mybind2 = boundFunction(functionB, 10, 12);
  
          iter(mybind);
          iter(mybind2);
  
      }
  
      //Method with pseudo parameter
      private void iter(functionSignature){
          for(Float i : textData){
  
              //Pseudo call to pseudo parameter
              functionSignature();
  
          }
      }
  
      private void functionA(int a, int b){
          //dostuff
  
      }
  
      private void functionB(int a, int b){
          //do other stuff
  
      }
  </code></pre>
  
  <p>}</p>
  
  <p>Bare in mind, I'm not looking for 'another way to accomplish this functionality' - this example is to illustrate a general way in which I would like to use functions as parameters, and to bind parameters to those functions.</p>
  
  <p>Edit>>></p>
  
  <p>Attempt using anonymous classes:</p>
  
  <pre><code>public class DataView {
  
      private class Bound{ 
          public void run(){}
  
      }
  
      private static ArrayList&lt;Float&gt; rectData = new ArrayList&lt;Float&gt;();
      private static ArrayList&lt;Float&gt; textData = new ArrayList&lt;Float&gt;();
  
      DataView(){
  
          Bound mybind = new Bound(){
              public void run(){
                  functionA(5,10);
              }
          };
  
          Bound mybind2 = new Bound(){
              public void run(){
                  functionB(5,10);
              }
          };
  
          iter(mybind);
          iter(mybind2);
  
      }
  
      private void iter(Bound function){
          for(Float i : textData){
  
              function.run();
  
          }
      }
  
      private void functionA(int a, int b){
          //dostuff
  
      }
  
      private void functionB(int a, int b){
          //do other stuff
  
      }
  }
  </code></pre>