Package it.unimi.di.prog2.h18.refactored
Class ListBasedAbstractIntSet
java.lang.Object
it.unimi.di.prog2.h18.refactored.AbstractIntSet
it.unimi.di.prog2.h18.refactored.ListBasedAbstractIntSet
- Direct Known Subclasses:
IntSet
,OrderedIntSet
An partial implementation of
AbstractIntSet
based on List
.-
Field Summary
FieldsFields inherited from class it.unimi.di.prog2.h18.refactored.AbstractIntSet
size
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class it.unimi.di.prog2.h18.refactored.AbstractIntSet
choose, equals, hashCode, insert, isIn, size, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
elements
The set elements.
-
-
Constructor Details
-
ListBasedAbstractIntSet
public ListBasedAbstractIntSet()Creates an empty set.
-
-
Method Details
-
iterator
-
remove
public void remove(int x) Description copied from class:AbstractIntSet
Removes the given element from this set.This method modifies the object, that is: \( S' = S \setminus \{ x \} \).
- Specified by:
remove
in classAbstractIntSet
- Parameters:
x
- the element to be removed.
-