Package org.djutils.immutablecollections
Interface ImmutableSet<E>
- Type Parameters:
 E- the type of content of this Set
- All Superinterfaces:
 ImmutableCollection<E>,Iterable<E>,Serializable
- All Known Subinterfaces:
 ImmutableNavigableSet<E>,ImmutableSortedSet<E>
- All Known Implementing Classes:
 ImmutableAbstractSet,ImmutableHashSet,ImmutableLinkedHashSet,ImmutableTreeSet
public interface ImmutableSet<E> extends ImmutableCollection<E>
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-2020 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djutils.org. The DJUTILS project is distributed under a three-clause BSD-style license, which can be found at https://djutils.org/docs/license.html.
- Author:
 - Alexander Verbraeck, Peter Knoppers, Wouter Schakel
 
- 
Method Summary
Modifier and Type Method Description booleanequals(Object obj)Force to redefine equals for the implementations of immutable collection classes.inthashCode()Force to redefine hashCode for the implementations of immutable collection classes.Set<E>toSet()Returns a modifiable copy of this immutable set.StringtoString()Force to redefine toString.Methods inherited from interface org.djutils.immutablecollections.ImmutableCollection
contains, containsAll, containsAll, isCopy, isEmpty, isWrap, iterator, parallelStream, size, spliterator, stream, toArray, toArray, toCollection 
- 
Method Details
- 
toSet
Returns a modifiable copy of this immutable set.- Returns:
 - a modifiable copy of this immutable set.
 
 - 
equals
Force to redefine equals for the implementations of immutable collection classes.- Specified by:
 equalsin interfaceImmutableCollection<E>- Overrides:
 equalsin classObject- Parameters:
 obj- Object; the object to compare this collection with- Returns:
 - whether the objects are equal
 
 - 
hashCode
int hashCode()Force to redefine hashCode for the implementations of immutable collection classes.- Specified by:
 hashCodein interfaceImmutableCollection<E>- Overrides:
 hashCodein classObject- Returns:
 - the calculated hashCode
 
 - 
toString
String toString()Force to redefine toString. 
 -