org.codefilarete.tool.collection.ReadOnlySet Maven / Gradle / Ivy
package org.codefilarete.tool.collection;
import java.util.HashSet;
import java.util.Set;
/**
* A marking class for {@link Set} which elements cannot be added nor removed.
*
* @param element type
* @author Guillaume Mary
*/
public class ReadOnlySet extends ReadOnlyCollection> implements Set {
public ReadOnlySet() {
this(new HashSet<>());
}
public ReadOnlySet(Set extends E> set) {
super((Set) set);
}
}