package greycat.internal.tree.ndmanager;

import greycat.struct.NDManager;

/**
 * Created by assaad on 11/05/2017.
 */
public class ProfileManager implements NDManager {
    @Override
    public Object get(long id) {
        return id;
    }

    @Override
    public long updateExistingLeafNode(long oldKey, Object valueToInsert) {
        return oldKey + (long) valueToInsert;
    }

    @Override
    public boolean updateParentsOnExisting() {
        return true;
    }

    @Override
    public boolean updateParentsOnNewValue() {
        return true;
    }

    @Override
    public boolean parentsHaveNodes() {
        return true;
    }

    @Override
    public long getNewLeafNode(Object valueToInsert) {
        return 0;
    }

    @Override
    public long getNewParentNode() {
        return 0;
    }

    @Override
    public long updateParent(long parentkey, double[] key, Object valueToInsert) {
        return parentkey + (long) valueToInsert;
    }
}

@@ -1,8 +1,643 @@
+/**%0A * Copyright 2017 The GreyCat Authors.  All rights reserved.%0A * %3Cp%3E%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A * %3Cp%3E%0A * http://www.apache.org/licenses/LICENSE-2.0%0A * %3Cp%3E%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A
 package 

fix header