Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright (c) 2008 Harold Cooper. All rights reserved.
* Licensed under the MIT License.
* See LICENSE file in the project root for full license information.
*/
package org.pcollections;
import java.io.Serializable;
import java.util.AbstractMap;
import java.util.AbstractSet;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
/**
*
* An efficient persistent map from integer keys to non-null values.
*
* Iteration occurs in the integer order of the keys.
*
* This implementation is thread-safe (assuming Java's AbstractMap and AbstractSet are thread-safe),
* although its iterators may not be.
*
* The balanced tree is based on the Glasgow Haskell Compiler's Data.Map implementation,
* which in turn is based on "size balanced binary trees" as described by:
*
* Stephen Adams, "Efficient sets: a balancing act",
* Journal of Functional Programming 3(4):553-562, October 1993,
* http://www.swiss.ai.mit.edu/~adams/BB/.
*
* J. Nievergelt and E.M. Reingold, "Binary search trees of bounded balance",
* SIAM journal of computing 2(1), March 1973.
*
* @author harold
*
* @param
*/
public final class IntTreePMap extends AbstractMap implements PMap, Serializable {
private static final long serialVersionUID = 1L;
//// STATIC FACTORY METHODS ////
private static final IntTreePMap