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

org.pure4j.collections.TransientTreeMap Maven / Gradle / Ivy

There is a newer version: 0.3.1
Show newest version
package org.pure4j.collections;

import java.util.Comparator;
import java.util.Map;
import java.util.TreeMap;

public class TransientTreeMap extends TreeMap implements ITransientMap {

	public TransientTreeMap() {
		super();
	}


	public TransientTreeMap(Comparator comparator) {
		super(comparator);
	}

	public TransientTreeMap(PersistentTreeMap pt) {
		this(pt.comparator());
		for (Map.Entry entry : pt.entrySet()) {
			this.put(entry.getKey(), entry.getValue());
		}
	}

	@Override
	public int count() {
		return size();
	}

	
	@Override
	public IPersistentMap persistent() {
		return PersistentTreeMap.create(comparator(), this);
	}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy