Package com.carrotsearch.hppc
Interface CharSet
-
- All Superinterfaces:
CharCollection,CharContainer,java.lang.Iterable<CharCursor>
- All Known Implementing Classes:
CharHashSet,CharScatterSet
@Generated(date="2024-05-16T12:00:00+0000", value="KTypeSet.java") public interface CharSet extends CharCollectionA set ofchars.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanadd(char k)Addskto the set.java.lang.StringvisualizeKeyDistribution(int characters)Visually depict the distribution of keys.-
Methods inherited from interface com.carrotsearch.hppc.CharCollection
clear, release, removeAll, removeAll, removeAll, retainAll, retainAll
-
-
-
-
Method Detail
-
add
boolean add(char 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
java.lang.String visualizeKeyDistribution(int characters)
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.
-
-