import static com.google.common.base.Preconditions.checkArgument;
import static java.util.Objects.requireNonNull;
-import com.google.common.base.Predicate;
import com.google.common.base.Strings;
import com.google.common.collect.Iterables;
import com.google.common.util.concurrent.FutureCallback;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ExecutionException;
+import java.util.function.Predicate;
import javax.ws.rs.NotFoundException;
import javax.ws.rs.WebApplicationException;
import org.opendaylight.mdsal.binding.api.DataBroker;
public void schemaSourceRegistered(final Iterable<PotentialSchemaSource<?>> sources) {
final Map<ModuleKey, Module> newModules = new HashMap<>();
- for (PotentialSchemaSource<?> potentialYangSource : Iterables.filter(sources, YANG_SCHEMA_SOURCE)) {
+ for (PotentialSchemaSource<?> potentialYangSource : Iterables.filter(sources, YANG_SCHEMA_SOURCE::test)) {
final YangIdentifier moduleName =
new YangIdentifier(potentialYangSource.getSourceIdentifier().name().getLocalName());
@Override
public void schemaSourceUnregistered(final PotentialSchemaSource<?> source) {
- if (!YANG_SCHEMA_SOURCE.apply(source)) {
+ if (!YANG_SCHEMA_SOURCE.test(source)) {
// if representation of potential schema source is not yang text schema source do nothing
// we do not want to delete this module entry from module list
return;