package nl.tudelft.simulation.immutablecollections; import java.util.Set; /** * A Set interface without the methods that can change it. The constructor of the ImmutableSet needs to be given an * initial Set. *

* Copyright (c) 2016-2018 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights * reserved. See for project information * https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can * be found at * https://simulation.tudelft.nl/dsol/3.0/license.html. *

* @author Alexander Verbraeck * @author Peter Knoppers * @author Wouter Schakel * @param the type of content of this Set */ public interface ImmutableSet extends ImmutableCollection { /** * Returns a modifiable copy of this immutable set. * @return a modifiable copy of this immutable set. */ Set toSet(); /** * Force to redefine equals for the implementations of immutable collection classes. * @param obj the object to compare this collection with * @return whether the objects are equal */ @Override boolean equals(Object obj); /** * Force to redefine hashCode for the implementations of immutable collection classes. * @return the calculated hashCode */ @Override int hashCode(); }