@@ -0,0 +1,1905 @@
+/*%0A * Copyright (c) 2012 Mateusz Parzonka, Eric Bodden%0A * All rights reserved. This program and the accompanying materials%0A * are made available under the terms of the Eclipse Public License v1.0%0A * which accompanies this distribution, and is available at%0A * http://www.eclipse.org/legal/epl-v10.html%0A *%0A * Contributors:%0A * Mateusz Parzonka - initial API and implementation%0A */%0Apackage prm4j.indexing.treebased.impl;%0A%0Aimport prm4j.indexing.treebased.LowLevelBinding;%0Aimport prm4j.indexing.treebased.Node;%0Aimport prm4j.indexing.treebased.NodeStore;%0A%0Apublic class DefaultNodeStore%3CA%3E implements NodeStore%3CA%3E %7B%0A%0A    private Node%3CA%3E rootNode;%0A%0A    public DefaultNodeStore() %7B%0A//%09this.rootNode = rootNode; // TODO%0A    %7D%0A%0A    @Override%0A    public Node%3CA%3E getNode(LowLevelBinding%3CA%3E%5B%5D bindings) %7B%0A%09// fast track for the parameterless instance%0A%09if (bindings.length == 0) %7B%0A%09    return rootNode;%0A%09%7D%0A%09// retrieve the head of the array pointing to the first node we will use%0A%09Node%3CA%3E node = bindings%5B0%5D.getBaseNode();%0A%09// we iterate over the rest %7B node1 , ..., nodeN %7D, traversing the tree%0A%09for (int i = 1; i %3C bindings.length; i++) %7B%0A%09    // traverse the node tree until the parameter instance is fully realized%0A%09    node = node.getNodeMap().getNode(bindings%5Bi%5D);%0A%09%7D%0A%09return node;%0A    %7D%0A%0A    @Override%0A    public Node%3CA%3E getNode(LowLevelBinding%3CA%3E%5B%5D bindings, int%5B%5D parameterMask) %7B%0A%09// fast track for the parameterless instance%0A%09if (parameterMask.length == 0) %7B%0A%09    return rootNode;%0A%09%7D%0A%09// retrieve the head of the array pointing to the first node we will use%0A%09Node%3CA%3E node = bindings%5BparameterMask%5B0%5D%5D.getBaseNode();%0A%09// we iterate over the rest %7B node1 , ..., nodeN %7D, traversing the tree%0A%09for (int i = 1; i %3C parameterMask.length; i++) %7B%0A%09    // traverse the node tree until the parameter instance is fully realized%0A%09    node = node.getNodeMap().getNode(bindings%5BparameterMask%5Bi%5D%5D);%0A%09%7D%0A%09return node;%0A    %7D%0A%0A%7D%0A

Add DefaultNodeStore