Package com.carrotsearch.hppc
Interface ByteSet
- All Superinterfaces:
ByteCollection
,ByteContainer
,Iterable<ByteCursor>
- All Known Implementing Classes:
ByteHashSet
,ByteScatterSet
@Generated(date="2023-10-26T04:33:09+0000",
value="KTypeSet.java")
public interface ByteSet
extends ByteCollection
A set of
byte
s.-
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(byte k) Addsk
to the set.visualizeKeyDistribution
(int characters) Visually depict the distribution of keys.Methods inherited from interface com.carrotsearch.hppc.ByteCollection
clear, release, removeAll, removeAll, removeAll, retainAll, retainAll
Methods inherited from interface com.carrotsearch.hppc.ByteContainer
contains, forEach, isEmpty, iterator, size, toArray
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
add
boolean add(byte k) Addsk
to the set.- Returns:
- Returns
true
if this element was not part of the set before. Returnsfalse
if 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.
-