Package com.carrotsearch.hppc
Interface ShortSet
- All Superinterfaces:
Iterable<ShortCursor>,ShortCollection,ShortContainer
- All Known Implementing Classes:
ShortHashSet,ShortScatterSet
@Generated(date="2026-07-15T20:04:51+0000",
value="KTypeSet.java")
public interface ShortSet
extends ShortCollection
A set of
shorts.-
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(short k) Addskto the set.visualizeKeyDistribution(int characters) Visually depict the distribution of keys.Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
add
boolean add(short k) Addskto the set.- Returns:
- Returns
trueif this element was not part of the set before. Returnsfalseif 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.
-