*/
package org.opendaylight.controller.cluster.datastore.persisted;
-import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import java.util.Collection;
+import java.util.Optional;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode;
abstract class ModifiedDataTreeCandidateNode extends AbstractDataTreeCandidateNode {
private final Collection<DataTreeCandidateNode> children;
- private ModifiedDataTreeCandidateNode(final ModificationType type, final Collection<DataTreeCandidateNode> children) {
+ private ModifiedDataTreeCandidateNode(final ModificationType type,
+ final Collection<DataTreeCandidateNode> children) {
super(type);
this.children = Preconditions.checkNotNull(children);
}
- static DataTreeCandidateNode create(final Collection<DataTreeCandidateNode> children) {
- return new ModifiedDataTreeCandidateNode(ModificationType.SUBTREE_MODIFIED, children) {
+ static DataTreeCandidateNode create(final ModificationType type, final Collection<DataTreeCandidateNode> children) {
+ return new ModifiedDataTreeCandidateNode(type, children) {
@Override
public PathArgument getIdentifier() {
throw new UnsupportedOperationException("Root node does not have an identifier");
};
}
- static DataTreeCandidateNode create(final PathArgument identifier, final ModificationType type, final Collection<DataTreeCandidateNode> children) {
+ static DataTreeCandidateNode create(final PathArgument identifier, final ModificationType type,
+ final Collection<DataTreeCandidateNode> children) {
return new ModifiedDataTreeCandidateNode(type, children) {
@Override
- public final PathArgument getIdentifier() {
+ public PathArgument getIdentifier() {
return identifier;
}
};