- All Superinterfaces:
IntCollection
,IntContainer
,Iterable<IntCursor>
- All Known Implementing Classes:
IntHashSet
@Generated(date="2024-06-04T15:20:17+0200",
value="KTypeSet.java")
public interface IntSet
extends IntCollection
A set of
int
s.-
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(int k) Addsk
to the set.int
addAll
(IntContainer container) Adds all elements from the givenIntContainer
to this set.visualizeKeyDistribution
(int characters) Visually depict the distribution of keys.Methods inherited from interface com.carrotsearch.hppc.IntCollection
clear, release, removeAll, removeAll, removeAll, retainAll, retainAll
Methods inherited from interface com.carrotsearch.hppc.IntContainer
contains, forEach, isEmpty, iterator, size, toArray
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
add
boolean add(int k) Addsk
to the set.- Returns:
- Returns
true
if this element was not part of the set before. Returnsfalse
if an equal element is already part of the set, does not replace the existing element with the argument.
-
visualizeKeyDistribution
Visually depict the distribution of keys.- Parameters:
characters
- The number of characters to "squeeze" the entire buffer into.- Returns:
- Returns a sequence of characters where '.' depicts an empty fragment of the internal buffer and 'X' depicts full or nearly full capacity within the buffer's range and anything between 1 and 9 is between.
-
addAll
Adds all elements from the givenIntContainer
to this set.- Returns:
- Returns the number of elements actually added as a result of this call (not previously present in the set).
- Since:
- 0.9.1
-