Top Description Methods
com.carrotsearch.hppc

public Interface ObjectSet<KType>

extends ObjectCollection<KType>
Known Direct Implementers
com.carrotsearch.hppc.ObjectHashSet
Annotations
@Generated:KTypeSet.java
date:2024-06-04T15:20:17+0200

A set of Objects.

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
(KType 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
(ObjectContainer<? extends KType> container)

Adds all elements from the given ObjectContainer 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.ObjectCollection:
clearreleaseremoveAllremoveAllremoveAllretainAllretainAll

Method Detail

addback to summary
public boolean add(KType 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(ObjectContainer<? extends KType> container)

Adds all elements from the given ObjectContainer 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.