Top Description Methods
com.carrotsearch.hppc

public Interface LongByteAssociativeContainer

extends Iterable<LongByteCursor>
Known Direct Subinterfaces
com.carrotsearch.hppc.LongByteMap
Annotations
@Generated:KTypeVTypeAssociativeContainer.java
date:2024-06-04T15:20:17+0200
Imports
com.carrotsearch.hppc.cursors.*, com.carrotsearch.hppc.predicates.*, com.carrotsearch.hppc.procedures.*, java.util.Iterator

An associative container from keys to (one or possibly more) values.
See Also
LongContainer

Method Summary

Modifier and TypeMethod and Description
public boolean
containsKey(long key)

Returns true if this container has an association to a value for the given key.

public <T extends LongByteProcedure> T
forEach(T procedure)

Applies a given procedure to all keys-value pairs in this container.

public <T extends LongBytePredicate> T
forEach(T predicate)

Applies a given predicate to all keys-value pairs in this container.

public boolean

Returns:

Return true if this hash map contains no assigned keys.
isEmpty
()

public Iterator<LongByteCursor>
iterator()

Redeclares java.lang.Iterable.iterator.

Returns a cursor over the entries (key-value pairs) in this map.

public LongCollection
keys()

Returns a collection of keys of this container.

public int

Returns:

Returns the number of elements actually removed as a result of this call.
removeAll
(LongContainer container)

Removes all keys (and associated values) present in a given container.

public int

Returns:

Returns the number of elements actually removed as a result of this call.
removeAll
(LongPredicate predicate)

Removes all keys (and associated values) for which the predicate returns true.

public int

Returns:

Returns the number of elements actually removed as a result of this call.
removeAll
(LongBytePredicate predicate)

Removes all keys (and associated values) for which the predicate returns true.

public int

Returns:

Returns the current size (number of assigned keys) in the container.
size
()

public ByteContainer
values()

Returns a container view of all values present in this container.

Inherited from java.lang.Iterable:
forEachspliterator

Method Detail

containsKeyback to summary
public boolean containsKey(long key)

Returns true if this container has an association to a value for the given key.

forEachback to summary
public <T extends LongByteProcedure> T forEach(T procedure)

Applies a given procedure to all keys-value pairs in this container. Returns the argument (any subclass of LongByteProcedure. This lets the caller call methods of the argument by chaining the call (even if the argument is an anonymous type) to retrieve computed values.

forEachback to summary
public <T extends LongBytePredicate> T forEach(T predicate)

Applies a given predicate to all keys-value pairs in this container. Returns the argument (any subclass of LongBytePredicate. This lets the caller call methods of the argument by chaining the call (even if the argument is an anonymous type) to retrieve computed values.

The iteration is continued as long as the predicate returns true.

isEmptyback to summary
public boolean isEmpty()
Returns:boolean

Return true if this hash map contains no assigned keys.

iteratorback to summary
public Iterator<LongByteCursor> iterator()

Redeclares java.lang.Iterable.iterator.

Returns a cursor over the entries (key-value pairs) in this map. The iterator is implemented as a cursor and it returns the same cursor instance on every call to Iterator#next(). To read the current key and value use the cursor's public fields. An example is shown below.

for (IntShortCursor c : intShortMap) {
  System.out.println("index=" + c.index + " key=" + c.key + " value=" + c.value);
}

The index field inside the cursor gives the internal index inside the container's implementation. The interpretation of this index depends on to the container.

Returns:Iterator<LongByteCursor>

Doc from java.lang.Iterable.iterator.

an Iterator.

Annotations
@Override
keysback to summary
public LongCollection keys()

Returns a collection of keys of this container. The returned collection is a view over the key set and any modifications (if allowed) introduced to the collection will propagate to the associative container immediately.

removeAllback to summary
public int removeAll(LongContainer container)

Removes all keys (and associated values) present in a given container. An alias to:

keys().removeAll(container)
but with no additional overhead.
Returns:int

Returns the number of elements actually removed as a result of this call.

removeAllback to summary
public int removeAll(LongPredicate predicate)

Removes all keys (and associated values) for which the predicate returns true.

Returns:int

Returns the number of elements actually removed as a result of this call.

removeAllback to summary
public int removeAll(LongBytePredicate predicate)

Removes all keys (and associated values) for which the predicate returns true.

Returns:int

Returns the number of elements actually removed as a result of this call.

sizeback to summary
public int size()
Returns:int

Returns the current size (number of assigned keys) in the container.

valuesback to summary
public ByteContainer values()

Returns a container view of all values present in this container. The returned collection is a view over the key set and any modifications (if allowed) introduced to the collection will propagate to the associative container immediately.