|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.api.ads.common.lib.utils.MapUtils
public final class MapUtils
A utility class for managing maps as represented in the API.
| Constructor Summary | |
|---|---|
MapUtils()
Default constructor. |
|
| Method Summary | ||
|---|---|---|
|
toArray(Map<K,V> map,
T[] a)
Generates an array of entries from a map. |
|
|
toMap(T[] entryArray)
Generates a map from an array an entries. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MapUtils()
| Method Detail |
|---|
public <K,V,T> Map<K,V> toMap(T[] entryArray)
throws IllegalArgumentException
key and value with a name
typically in the form of Key_ValueMapEntry, represnted here as
T. The generated map must have same type K as the key within Key_ValueMapEntry. The same applies for V and
value within Key_ValueMapEntry.
K - the type of the entry keyV - the type of the entry valueT - the map entry typeentryArray - the array of entries constituting a map as represented in
the API
K and V representing the entry array
IllegalArgumentException - if entryArray is not compatible
with Map<K, V> or if entryArray == null
public <K,V,T> T[] toArray(Map<K,V> map,
T[] a)
key and value with a name
typically in the form of Key_ValueMapEntry, represented here as
T. The generated array can be used in objects where Key_ValueMapEntry[] is taken as a value. The input map must have same type
K as the key within Key_ValueMapEntry. The same
applies for V and value within Key_ValueMapEntry.
K - the type of the entry keyV - the type of the entry valueT - the map entry typemap - a map of type K and V representing the entry
arraya - the array into which the entries of this map are to be stored, if
it is big enough; otherwise, a new array of the same runtime type is
allocated for this purpose
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||