convert lambda to function/method
<p>I am trying to understand a program in java which has used lambda to return object into the reference variable of an interface. I want to convert lambda into simple java function, but not sure how to do it.</p>

<p>The program is as follows:-</p>

<pre><code>public class AgentLicenseLazyModel extends CoreDataModel&lt;AgentLicenseModel&gt; {

    public AgentLicenseLazyModel(final List&lt;AgentLicenseModel&gt; entities) {
        super(AgentLicenseModel.class, entities, (sortField, sortOrder) -&gt; {
            return new AgentLicenseLazySorter(sortField, sortOrder);
        });
    }
}
</code></pre>

<p>Here is the abstract class: </p>

<pre><code>public abstract class CoreDataModel&lt;T extends AbstractEntityModel&gt; extends LazyDataModel&lt;T&gt; {

private final Class&lt;T&gt; entityClass;
private final List&lt;T&gt; entities;
private final CoreDataSorterProducer&lt;T&gt; coreDataSorterProducer;

public CoreDataModel(final Class&lt;T&gt; entityClass, final List&lt;T&gt; entities, final CoreDataSorterProducer&lt;T&gt; coreDataSorterProducer) {
    this.entityClass = entityClass;
    this.entities = entities;
    this.coreDataSorterProducer = coreDataSorterProducer;

    if (entities != null) {
        setRowCount(entities.size());
    }
}
</code></pre>

<p>How to convert this program into simple java program without use of lambda for learning. Please help.</p>

<p>Edited:
Here is the CoreDataSorterProducer:</p>

<pre><code>@FunctionalInterface
public interface CoreDataSorterProducer&lt;T extends AbstractEntityModel&gt; {

    CoreDataSorter&lt;T&gt; produce(String sortField, SortOrder sortOrder);
}
</code></pre>