mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-11-06 03:01:35 +01:00
Use lambda instead of anonymous inner class
Change-Id: I5b2b93e82ec50296af66970ac518d7e0e8a14177
This commit is contained in:
parent
c606956184
commit
06a6c9f94c
@ -16,7 +16,6 @@
|
|||||||
package org.onosproject.store.device.impl;
|
package org.onosproject.store.device.impl;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
import com.google.common.base.Predicate;
|
|
||||||
import com.google.common.collect.FluentIterable;
|
import com.google.common.collect.FluentIterable;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
@ -286,13 +285,7 @@ public class GossipDeviceStore
|
|||||||
@Override
|
@Override
|
||||||
public Iterable<Device> getAvailableDevices() {
|
public Iterable<Device> getAvailableDevices() {
|
||||||
return FluentIterable.from(getDevices())
|
return FluentIterable.from(getDevices())
|
||||||
.filter(new Predicate<Device>() {
|
.filter(input -> isAvailable(input.id()));
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean apply(Device input) {
|
|
||||||
return isAvailable(input.id());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user