Top Description Methods
com.carrotsearch.hppc

public Interface IntSet

extends IntCollection
Known Direct Implementers
com.carrotsearch.hppc.IntHashSet
Annotations
@Generated:KTypeSet.java
date:2024-06-04T15:20:17+0200

A set of ints.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

Returns true if this element was not part of the set before. Returns false if an equal element is already part of the set, does not replace the existing element with the argument.
add
(int k)

Adds k to the set.

public int

Returns:

Returns the number of elements actually added as a result of this call (not previously present in the set).
addAll
(IntContainer container)

Adds all elements from the given IntContainer to this set.

public String

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.
visualizeKeyDistribution
(int
The number of characters to "squeeze" the entire buffer into.
characters
)

Visually depict the distribution of keys.

Inherited from com.carrotsearch.hppc.IntCollection:
clearreleaseremoveAllremoveAllremoveAllretainAllretainAll

Method Detail

addback to summary
public boolean add(int k)

Adds k to the set.

Returns:boolean

Returns true if this element was not part of the set before. Returns false if an equal element is already part of the set, does not replace the existing element with the argument.

addAllback to summary
public int addAll(IntContainer container)

Adds all elements from the given IntContainer to this set.

Returns:int

Returns the number of elements actually added as a result of this call (not previously present in the set).

Since
0.9.1
visualizeKeyDistributionback to summary
public String visualizeKeyDistribution(int characters)

Visually depict the distribution of keys.

Parameters
characters:int

The number of characters to "squeeze" the entire buffer into.

Returns:String

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.