com.ajjpj.abase.collection.immutable.AHashSet Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of a-base Show documentation
Show all versions of a-base Show documentation
a-base is a library of basic (hence the name) classes, most notably immutable collection classes with copy-on-write operations
The newest version!
package com.ajjpj.abase.collection.immutable;
import com.ajjpj.abase.collection.ACollectionHelper;
import com.ajjpj.abase.collection.AEquality;
import com.ajjpj.abase.function.AFunction1;
import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
/**
* This is an immutable hash set implementation. It has mutator methods that return a modified copy of the set. It
* does not implement java.util.Set
because that interface is inherently mutable. It does however
* provide a method to return an immutable view implementing java.util.Set
.
*
* It provides uniqueness guarantees based on a configurable equalityForEquals strategy which defaults to "equals-based".
*
* @author arno
*/
public class AHashSet extends AbstractACollection> implements Serializable {
private final AHashMap inner;
private static final AHashSet