Module org.jhotdraw8.icollection
Class AbstractReadOnlySet<E>
java.lang.Object
org.jhotdraw8.icollection.readonly.AbstractReadOnlyCollection<E>
org.jhotdraw8.icollection.readonly.AbstractReadOnlySet<E>
- Type Parameters:
E- the element type
- All Implemented Interfaces:
Iterable<E>,ReadOnlyCollection<E>,ReadOnlySet<E>
- Direct Known Subclasses:
ImmutableSetFacade,ReadOnlySetFacade
public abstract class AbstractReadOnlySet<E>
extends AbstractReadOnlyCollection<E>
implements ReadOnlySet<E>
Abstract base class for
ReadOnlySets.-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.jhotdraw8.icollection.readonly.AbstractReadOnlyCollection
contains, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlyCollection
asCollection, contains, containsAll, isEmpty, iterator, size, stream, toArray, toArrayMethods inherited from interface org.jhotdraw8.icollection.readonly.ReadOnlySet
asSet, characteristics
-
Constructor Details
-
AbstractReadOnlySet
public AbstractReadOnlySet()Constructs a new instance.
-
-
Method Details
-
equals
Description copied from interface:ReadOnlySetCompares the specified object with this set for equality.Returns
trueif the given object is also a read-only set and the two sets contain the same elements, ignoring the sequence of the elements.Implementations of this method should use
ReadOnlySet.setEquals(org.jhotdraw8.icollection.readonly.ReadOnlySet<E>, java.lang.Object).- Specified by:
equalsin interfaceReadOnlySet<E>- Overrides:
equalsin classObject- Parameters:
o- an object- Returns:
trueif the object is equal to this map
-
hashCode
public int hashCode()Description copied from interface:ReadOnlySetReturns the hash code value for this set. The hash code is the sum of the hash code of its elements.Implementations of this method should use
ReadOnlySet.iteratorToHashCode(java.util.Iterator<E>).- Specified by:
hashCodein interfaceReadOnlySet<E>- Overrides:
hashCodein classObject- Returns:
- the hash code value for this set
- See Also:
-