public class SpreadMap
extends HashMap
Helper to turn a list with an even number of elements into a Map.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public boolean |
equals(Object that){@inheritDoc} |
|
public boolean |
equals(SpreadMap that)Compares this spread map with another spread map using Groovy equality. |
|
public int |
hashCode(){@inheritDoc} |
|
public Object |
put(Object key, Object value)Always throws because spread maps are immutable. |
|
public void |
putAll(Map t)Always throws because spread maps are immutable. |
|
public Object |
remove(Object key)Always throws because spread maps are immutable. |
|
public String |
toString()
|
| Methods inherited from class | Name |
|---|---|
class HashMap |
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getClass, getOrDefault, hashCode, isEmpty, keySet, merge, notify, notifyAll, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, toString, values, wait, wait, wait |
Creates an immutable spread map from alternating key/value entries.
values - alternating keys and valuesCreates an immutable spread map from an existing map.
map - the source map
list - the list to make spreadable{@inheritDoc}
Compares this spread map with another spread map using Groovy equality.
that - the other spread maptrue if the maps are equal{@inheritDoc}
Always throws because spread maps are immutable.
key - the key to addvalue - the value to addAlways throws because spread maps are immutable.
t - the entries to addAlways throws because spread maps are immutable.
key - the key to remove
thisCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.