+/*
+ *
+ * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ */
+
package org.opendaylight.controller.cluster.datastore.node.utils;
import org.opendaylight.yangtools.yang.common.QName;
private final boolean doesMatch;
private final ListSchemaNode listSchemaNode;
- public NodeIdentifierWithPredicatesGenerator(String id){
- this(id, null);
- }
-
- public NodeIdentifierWithPredicatesGenerator(String id, ListSchemaNode schemaNode){
+ public NodeIdentifierWithPredicatesGenerator(String id, DataSchemaNode schemaNode){
this.id = id;
matcher = pattern.matcher(this.id);
doesMatch = matcher.matches();
- this.listSchemaNode = schemaNode;
+
+ if(schemaNode instanceof ListSchemaNode){
+ this.listSchemaNode = (ListSchemaNode) schemaNode;
+ } else {
+ this.listSchemaNode = null;
+ }
}