/*
 * Copyright (c) 2012 Mateusz Parzonka, Eric Bodden
 * 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
 *
 * Contributors:
 * Mateusz Parzonka - initial API and implementation
 */
package prm4j.logic;

import prm4j.indexing.treebased.MonitorSet;
import prm4j.indexing.treebased.Node;
import prm4j.indexing.treebased.NodeMap;

public class DefaultNodeContext<A> implements NodeContext<A>{

    private NodeContext<A>[] successors;
    private NodePrototype<A> nodePrototype;

    @Override
    public ChainingData[] getChainingData() {
	// TODO Auto-generated method stub
	return null;
    }

    @Override
    public MonitorSet<A> createMonitorSet() {
	// TODO Auto-generated method stub
	return null;
    }

    @Override
    public Node<A> createNode() {
	return nodePrototype.clonePrototype();
    }

    @Override
    public Node<A> createNode(int parameterId) {
	return successors[parameterId].createNode();
    }

    @Override
    public NodeMap<A> createNodeMap() {
	// TODO Auto-generated method stub
	return null;
    }

}

@@ -577,16 +577,17 @@
 ntext%3CA%3E
+ 
 %7B%0A%0A    p
@@ -667,16 +667,194 @@
 otype;%0A%0A
+    public DefaultNodeContext(NodeContext%3CA%3E%5B%5D successors, NodePrototype%3CA%3E nodePrototype) %7B%0A%09super();%0A%09this.successors = successors;%0A%09this.nodePrototype = nodePrototype;%0A    %7D%0A%0A
     @Ove
@@ -1401,10 +1401,249 @@
 %0A    %7D%0A%0A
+    public void setSuccessor(int parameterId, NodeContext%3CA%3E nodeContext) %7B%0A%09this.successors%5BparameterId%5D = nodeContext;%0A    %7D%0A%0A    public void setNodePrototype(NodePrototype%3CA%3E nodePrototype) %7B%0A%09this.nodePrototype = nodePrototype;%0A    %7D%0A%0A
 %7D%0A

Add configuration methods for DefaultNodeContext