[Java] Class SpreadMap
- groovy.lang.SpreadMap
Helper to turn a list with an even number of elements into a Map.
Constructor Summary
Constructor and description |
---|
SpreadMap
(Object[] values) |
SpreadMap
(Map map) |
SpreadMap
(List list) @since 1.8.0 |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
boolean |
equals(Object that) | |
boolean |
equals(SpreadMap that) | |
int |
hashCode() | |
Object |
put(Object key, Object value) | |
void |
putAll(Map t) | |
Object |
remove(Object key) | |
String |
toString() @return the string expression of this
|
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class HashMap | remove, remove, get, put, values, clone, clear, isEmpty, replace, replace, replaceAll, size, entrySet, putAll, putIfAbsent, forEach, keySet, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, getOrDefault, merge, equals, toString, hashCode, wait, wait, wait, getClass, notify, notifyAll |
class AbstractMap | remove, get, put, equals, toString, values, hashCode, clear, isEmpty, size, entrySet, putAll, keySet, containsKey, containsValue, wait, wait, wait, getClass, notify, notifyAll, remove, replace, replace, replaceAll, putIfAbsent, forEach, compute, computeIfAbsent, computeIfPresent, getOrDefault, merge |
Constructor Detail
public SpreadMap(Object[] values)
public SpreadMap(Map map)
public SpreadMap(List list)
- Since:
- 1.8.0
- Parameters:
-
list
- the list to make spreadable
Method Detail
@Override public boolean equals(Object that)
public boolean equals(SpreadMap that)
@Override public int hashCode()
public Object put(Object key, Object value)
public void putAll(Map t)
public Object remove(Object key)
public String toString()
- Returns:
- the string expression of
this
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.4.21/html/gapi/groovy/lang/SpreadMap.html