C# delegate to Java conversion
<p>I am in the process of converting some code from C# to Java. I have never used C# before, but it has been pretty easy up to this point.</p>

<p>I have a line that looks like this in the C# file:</p>

<pre><code> coverage.createMethod = delegate (Gridpoint gp){
 //Some method stuff in here, with a return objecct
 }
</code></pre>

<p>What exactly is this trying to do? It seems a little bit like an inline class but I am not sure how to go about converting htis to java</p>

<p>Edit: more on the specific problem</p>

<p>In a file called STKDriver.java i have the following</p>

<pre><code> CoverageDefinitionOnCentralBody coverage = new CoverageDefinitionOnCentralBody(...);
 .
 .
 .
 DClass value = new DClass(STKDriver.class, "invoke", CoverageGrid.class);
 coverage.setGridPointCreationMethod(value);
</code></pre>

<p>In the fill DClass.java, which extends CreateCoverageGridPointForAccess I have the following:</p>

<pre><code> public DClass(Class class1, String string, Class&lt;CoverageGridPoint&gt; class2{}
 .
 .
 .
 public IServiceProvider invoke(CoverageGridPoint gridPoint){
    return something; //of the classtype Platform
 }
</code></pre>

<p>Is this done correctly? The class definitions are linked here:</p>

<p><a href="http://www.agi.com/resources/help/online/AGIComponentsJava/index.html?page=source%2FWhatsNewJava.html" rel="nofollow">http://www.agi.com/resources/help/online/AGIComponentsJava/index.html?page=source%2FWhatsNewJava.html</a></p>

<p>Notice that the class CreateCoverageGridPointForAccess is abstract and extends that Delegate class.</p>

<p>Does this implementation I have created look correct? I Can write in more code if necessary</p>
