Interface IntSet
- All Superinterfaces:
IntCollection, IntContainer, Iterable<IntCursor>
- All Known Implementing Classes:
IntHashSet, IntScatterSet
@Generated(date="2024-05-16T08:18:11+0000",
value="KTypeSet.java")
public interface IntSet
extends IntCollection
A set of
ints.-
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(int k) Addskto the set.visualizeKeyDistribution(int characters) Visually depict the distribution of keys.Methods inherited from interface IntCollection
clear, release, removeAll, removeAll, removeAll, retainAll, retainAllMethods inherited from interface IntContainer
contains, forEach, forEach, isEmpty, iterator, size, toArrayMethods inherited from interface Iterable
forEach, spliterator
-
Method Details
-
add
boolean add(int k) Addskto the set.- Returns:
- Returns
trueif this element was not part of the set before. Returnsfalseif an equal element is part of the set, and replaces the existing equal element with the argument (if keys are object types).
-
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.
-