org.glassfish.hk2
Interface MultiMap<K,V>

All Known Implementing Classes:
MultiMap

Deprecated.

@Deprecated
public interface MultiMap<K,V>

A read-nly Map from a key to multiple values. Order is significant among values, and null values are allowed, although null keys are not.

Author:
Kohsuke Kawaguchi, Jerome Dochez

Method Summary
 boolean contains(K k1, V k2)
          Deprecated. Checks if the map contains the given key(s), also extending the search to including the sub collection.
 boolean containsKey(K k)
          Deprecated. Checks if the map contains the given key.
 Set<Map.Entry<K,List<V>>> entrySet()
          Deprecated. The complete read-only entry set.
 List<V> get(K k)
          Deprecated. Returns the elements indexed by the provided key
 V getFirst(K k)
          Deprecated. Gets the first value if any, or null.
 Set<K> keySet()
          Deprecated. Returns the keys of type K.
 int size()
          Deprecated. Returns the size of the map.
 

Method Detail

keySet

Set<K> keySet()
Deprecated. 
Returns the keys of type K.

Returns:
Can be empty but never null. Read-only.

get

List<V> get(K k)
Deprecated. 
Returns the elements indexed by the provided key

Parameters:
k - key for the values
Returns:
Can be empty but never null. Read-only.

containsKey

boolean containsKey(K k)
Deprecated. 
Checks if the map contains the given key.

Parameters:
k - key to test
Returns:
true if the map contains at least one element for this key

contains

boolean contains(K k1,
                 V k2)
Deprecated. 
Checks if the map contains the given key(s), also extending the search to including the sub collection.

Parameters:
k1 - key from top collection
k2 - key (value) from inner collection
Returns:
true if the map contains at least one element for these keys

getFirst

V getFirst(K k)
Deprecated. 
Gets the first value if any, or null.

This is useful when you know the given key only has one value and you'd like to get to that value.

Parameters:
k - key for the values
Returns:
null if the key has no values or it has a value but the value is null.

entrySet

Set<Map.Entry<K,List<V>>> entrySet()
Deprecated. 
The complete read-only entry set.

Returns:
a Set of Map.Entry of entries

size

int size()
Deprecated. 
Returns the size of the map.

Returns:
integer or 0 if the map is empty


Copyright © 2013 Oracle Corporation. All Rights Reserved.