org.organicdesign.fp.collections.PersistentHashSet Maven / Gradle / Ivy
/*
* Copyright (c) Rich Hickey. All rights reserved.
* The use and distribution terms for this software are covered by the
* Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
* which can be found in the file epl-v10.html at the root of this distribution.
* By using this software in any fashion, you are agreeing to be bound by
* the terms of this license.
* You must not remove this notice, or any other, from this software.
**/
/* rich Mar 3, 2008 */
/* glen added types 2015-06-06 any errors are now mine. */
package org.organicdesign.fp.collections;
import java.io.IOException;
import java.io.InvalidObjectException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.Map;
/**
A wrapper that turns a PersistentTreeMap into a set.
This file is a derivative work based on a Clojure collection licensed under the Eclipse Public
License 1.0 Copyright Rich Hickey
*/
public class PersistentHashSet extends AbstractUnmodSet
implements ImSet, Serializable {
// If you don't put this here, it inherits EMPTY from UnmodSet, which does not have .equals()
// defined. UnmodSet.empty won't put() either.
public static final PersistentHashSet