Use lambdas instead of StmtContextUtils.build{Declared,Effecive}
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / effective / EffectiveStatementBase.java
index c841a54d2b48faba467763d145000f38b9d3e7a8..7794efefadc60191c081ef49ad22cccfbc66928e 100644 (file)
@@ -7,7 +7,6 @@
  */
 package org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective;
 
-import com.google.common.base.Function;
 import com.google.common.base.Optional;
 import com.google.common.base.Predicate;
 import com.google.common.base.Predicates;
@@ -100,15 +99,11 @@ public abstract class EffectiveStatementBase<A, D extends DeclaredStatement<A>>
             this.unknownSubstatementsToBuild = ImmutableList.of();
         }
 
-        final Function<StmtContext<?, ?, ? extends EffectiveStatement<?, ?>>, EffectiveStatement<?, ?>> buildEffective = StmtContextUtils
-                .buildEffective();
-        this.substatements = ImmutableList.copyOf(Collections2.transform(substatementsToBuild, buildEffective));
+        this.substatements = ImmutableList.copyOf(Collections2.transform(substatementsToBuild, StatementContextBase::buildEffective));
     }
 
     Collection<EffectiveStatement<?, ?>> getOmittedUnknownSubstatements() {
-        final Function<StmtContext<?, ?, ? extends EffectiveStatement<?, ?>>, EffectiveStatement<?, ?>> buildEffective = StmtContextUtils
-                .buildEffective();
-        return Collections2.transform(unknownSubstatementsToBuild, buildEffective);
+        return Collections2.transform(unknownSubstatementsToBuild, StatementContextBase::buildEffective);
     }
 
     @Override