- All Known Implementing Classes:
DenseIntSet16Bit,DenseIntSet8Bit,GrowableIntSet8Bit
public interface IntSet
Interface for a collection of int-valued elements that contains no duplicates.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddAsInt(int e) Adds the specified element to the set if it is not already present.voidclear()Clears the set.booleancontainsAsInt(int e) Checks if this set contains the specified element.booleanremoveAsInt(int e) Removes the specified element from the set.
-
Method Details
-
addAsInt
boolean addAsInt(int e) Adds the specified element to the set if it is not already present.- Parameters:
e- element to be added to the set- Returns:
trueif this set did not already contain the specified element
-
removeAsInt
boolean removeAsInt(int e) Removes the specified element from the set.- Parameters:
e- an element- Returns:
- true if this set contained the element
-
containsAsInt
boolean containsAsInt(int e) Checks if this set contains the specified element.- Parameters:
e- an element- Returns:
- true if this set contains the element.
-
clear
void clear()Clears the set.
-