All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jamieswhiteshirt.rtree3i.NodeAndEntries Maven / Gradle / Ivy

The newest version!
package com.jamieswhiteshirt.rtree3i;

import java.util.List;

/**
 * Used for tracking deletions through recursive calls.
 * 
 * @param 
 *     entry key type
 * @param 
 *     entry value type
 */
final class NodeAndEntries {

    private final Node node;
    private final List> buckets;
    private final int count;

    /**
     * Constructor.
     *
     * @param node
     *            absent = whole node was deleted present = either an unchanged
     *            node because of no removal or the newly created node without
     *            the deleted entry
     * @param buckets
     *            from nodes that dropped below minChildren in size and thus
     *            their entries are to be redistributed (readded to the tree)
     * @param countDeleted
     *            count of the number of entries removed
     */
    NodeAndEntries(Node node, List> buckets, int countDeleted) {
        this.node = node;
        this.buckets = buckets;
        this.count = countDeleted;
    }

    public Node getNode() {
        return node;
    }

    public List> getEntriesToAdd() {
        return buckets;
    }

    public int countDeleted() {
        return count;
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy