@Generated(date="2017-07-11T19:16:24+0200",
value="KTypeVTypeAssociativeContainer.java")
public interface ShortObjectAssociativeContainer<VType>
extends java.lang.Iterable<ShortObjectCursor<VType>>
Object.hashCode() and Object.equals(Object).
Note that certain associative containers (like multimaps) may return the same key-value pair multiple times from iterators.
ShortContainer| Modifier and Type | Method and Description |
|---|---|
int |
capacity()
Return the maximum number of keys this container is guaranteed to hold without reallocating.
|
boolean |
containsKey(short key)
Returns
true if this container has an association to a value for
the given key. |
<T extends ShortObjectPredicate<? super VType>> |
forEach(T predicate)
Applies a
predicate to container elements, as long as the predicate
returns true. |
<T extends ShortObjectProcedure<? super VType>> |
forEach(T procedure)
Applies a given procedure to all keys-value pairs in this container.
|
boolean |
isEmpty() |
java.util.Iterator<ShortObjectCursor<VType>> |
iterator()
Returns a cursor over the entries (key-value pairs) in this map.
|
ShortCollection |
keys()
Returns a collection view of keys of this container.
|
int |
removeAll(ShortContainer container)
Removes all keys (and associated values) present in a given container.
|
int |
removeAll(ShortObjectPredicate<? super VType> predicate)
Removes all keys (and associated values) for which the predicate on (key, value) pairs returns
true. |
int |
removeAll(ShortPredicate predicate)
Removes all keys (and associated values) for which the predicate on keys returns
true. |
int |
size() |
ObjectCollection<VType> |
values()
Returns a collection view of all values present in this container.
|
java.util.Iterator<ShortObjectCursor<VType>> iterator()
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.
iterator in interface java.lang.Iterable<ShortObjectCursor<VType>>boolean containsKey(short key)
true if this container has an association to a value for
the given key.int size()
int capacity()
O(n) time.boolean isEmpty()
true if this hash map contains no assigned keys.int removeAll(ShortContainer container)
int removeAll(ShortPredicate predicate)
true.int removeAll(ShortObjectPredicate<? super VType> predicate)
true.<T extends ShortObjectProcedure<? super VType>> T forEach(T procedure)
ShortObjectProcedure. This lets the caller to call methods of the argument
by chaining the call (even if the argument is an anonymous type) to retrieve computed values,
for example.<T extends ShortObjectPredicate<? super VType>> T forEach(T predicate)
predicate to container elements, as long as the predicate
returns true. The iteration is interrupted otherwise.
Returns the argument (any
subclass of ShortObjectPredicate. This lets the caller to call methods of the argument
by chaining the call (even if the argument is an anonymous type) to retrieve computed values,
for example.
The iteration is continued as long as the predicate returns true.ShortCollection keys()
ObjectCollection<VType> values()
Copyright © 2017. All rights reserved.