Package groovy.lang
Class SpreadMap
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap
-
- groovy.lang.SpreadMap
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Map
public class SpreadMap extends HashMap
Helper to turn a list with an even number of elements into a Map.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object,V extends Object>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(SpreadMap that)
boolean
equals(Object that)
int
hashCode()
Object
put(Object key, Object value)
void
putAll(Map t)
Object
remove(Object key)
String
toString()
-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, putIfAbsent, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
putAll
public void putAll(Map t)
-
equals
public boolean equals(Object that)
- Specified by:
equals
in interfaceMap
- Overrides:
equals
in classAbstractMap
-
equals
public boolean equals(SpreadMap that)
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceMap
- Overrides:
hashCode
in classAbstractMap
-
toString
public String toString()
- Overrides:
toString
in classAbstractMap
- Returns:
- the string expression of
this
-
-