|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@Generated(date="2011-07-12T16:58:51+0200", value="HPPC generated from: CharDoubleAssociativeContainer.java") public interface CharDoubleAssociativeContainer
An associative container (alias: map, dictionary) from keys to (one or possibly more) values.
Object keys must fulfill the contract of Object.hashCode()
and Object.equals(Object)
.
Note that certain associative containers (like multimaps) may return the same key-value pair multiple times from iterators.
CharContainer
Method Summary | ||
---|---|---|
void |
clear()
Clear all keys and values in the container. |
|
boolean |
containsKey(char key)
Returns true if this container has an association to a value for
the given key. |
|
|
forEach(T procedure)
Applies a given procedure to all keys-value pairs in this container. |
|
boolean |
isEmpty()
|
|
java.util.Iterator<CharDoubleCursor> |
iterator()
Returns a cursor over the entries (key-value pairs) in this map. |
|
CharCollection |
keys()
Returns a collection of keys of this container. |
|
int |
removeAll(CharContainer container)
Removes all keys (and associated values) present in a given container. |
|
int |
removeAll(CharPredicate predicate)
Removes all keys (and associated values) for which the predicate returns true . |
|
int |
size()
|
|
DoubleContainer |
values()
Returns a container view of all values present in this container. |
Method Detail |
---|
java.util.Iterator<CharDoubleCursor> 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<CharDoubleCursor>
boolean containsKey(char key)
true
if this container has an association to a value for
the given key.
int size()
boolean isEmpty()
true
if this hash map contains no assigned keys.int removeAll(CharContainer container)
keys().removeAll(container)but with no additional overhead.
int removeAll(CharPredicate predicate)
true
.
An alias to:
keys().removeAll(container)but with no additional overhead.
<T extends CharDoubleProcedure> T forEach(T procedure)
CharDoubleProcedure
. 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.
void clear()
CharCollection keys()
DoubleContainer values()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |