*/
package org.opendaylight.controller.md.sal.binding.impl;
-import com.google.common.base.Preconditions;
+import static java.util.Objects.requireNonNull;
+
import java.util.Collection;
import org.opendaylight.controller.md.sal.binding.api.DataTreeChangeListener;
import org.opendaylight.controller.md.sal.binding.api.DataTreeModification;
* to their Binding equivalent.
*
*/
-final class BindingDOMDataTreeChangeListenerAdapter<T extends DataObject> implements DOMDataTreeChangeListener {
-
+@Deprecated
+class BindingDOMDataTreeChangeListenerAdapter<T extends DataObject> implements DOMDataTreeChangeListener {
private final BindingToNormalizedNodeCodec codec;
private final DataTreeChangeListener<T> listener;
private final LogicalDatastoreType store;
- BindingDOMDataTreeChangeListenerAdapter(final BindingToNormalizedNodeCodec codec, final DataTreeChangeListener listener,
- final LogicalDatastoreType store) {
- this.codec = Preconditions.checkNotNull(codec);
- this.listener = Preconditions.checkNotNull(listener);
- this.store = Preconditions.checkNotNull(store);
+ BindingDOMDataTreeChangeListenerAdapter(final BindingToNormalizedNodeCodec codec,
+ final DataTreeChangeListener<T> listener, final LogicalDatastoreType store) {
+ this.codec = requireNonNull(codec);
+ this.listener = requireNonNull(listener);
+ this.store = requireNonNull(store);
}
@Override
public void onDataTreeChanged(final Collection<DataTreeCandidate> domChanges) {
- final Collection<DataTreeModification<T>> bindingChanges = LazyDataTreeModification.from(codec, domChanges, store);
+ final Collection<DataTreeModification<T>> bindingChanges =
+ LazyDataTreeModification.from(codec, domChanges, store);
listener.onDataTreeChanged(bindingChanges);
}
+
+ @Override
+ public String toString() {
+ return listener.toString();
+ }
}