*/
package org.opendaylight.mdsal.dom.api;
+import java.util.Arrays;
import java.util.Collection;
import org.eclipse.jdt.annotation.NonNull;
import org.opendaylight.yangtools.concepts.ListenerRegistration;
* null or a SchemaPath which does not represent a valid {@link DOMNotification} type.
* @throws NullPointerException if listener is null
*/
- // FIXME: Java 8: provide a default implementation of this method.
- <T extends DOMNotificationListener> ListenerRegistration<T>
- registerNotificationListener(@NonNull T listener, SchemaPath... types);
+ default <T extends DOMNotificationListener> ListenerRegistration<T>
+ registerNotificationListener(@NonNull final T listener, final SchemaPath... types) {
+ return registerNotificationListener(listener, Arrays.asList(types));
+ }
}
import com.lmax.disruptor.WaitStrategy;
import com.lmax.disruptor.dsl.Disruptor;
import com.lmax.disruptor.dsl.ProducerType;
-import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.Set;
return reg;
}
- @Override
- public <T extends DOMNotificationListener> ListenerRegistration<T> registerNotificationListener(
- final T listener, final SchemaPath... types) {
- return registerNotificationListener(listener, Arrays.asList(types));
- }
-
/**
* Swaps registered listeners and triggers notification update.
*
final Collection<SchemaPath> types) {
return router.registerNotificationListener(listener, types);
}
-
- @Override
- public <T extends DOMNotificationListener> ListenerRegistration<T> registerNotificationListener(final T listener,
- final SchemaPath... types) {
- return router.registerNotificationListener(listener, types);
- }
}