Groovy 2.2.0

groovy.lang
[Java] Class SpreadMap

java.lang.Object
  java.util.AbstractMap
      java.util.HashMap
          groovy.lang.SpreadMap

public class SpreadMap
extends HashMap

Helper to turn a list with an even number of elements into a Map.

Authors:
Pilho Kim
Tim Tiemens


Constructor Summary
SpreadMap(Object[] values)

SpreadMap(Map map)

SpreadMap(List list)

@since 1.8.0

 
Method Summary
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

 
Methods inherited from class HashMap
remove, get, put, values, clone, clear, isEmpty, size, entrySet, putAll, keySet, containsKey, containsValue, equals, toString, hashCode, wait, wait, wait, getClass, notify, notifyAll
 
Methods inherited from class AbstractMap
remove, get, put, equals, toString, values, hashCode, clear, isEmpty, size, entrySet, putAll, keySet, containsKey, containsValue, wait, wait, wait, getClass, notify, notifyAll
 

Constructor Detail

SpreadMap

public SpreadMap(Object[] values)


SpreadMap

public SpreadMap(Map map)


SpreadMap

public SpreadMap(List list)
Parameters:
list - the list to make spreadable
Since:
1.8.0


 
Method Detail

equals

public boolean equals(Object that)


equals

public boolean equals(SpreadMap that)


hashCode

public int hashCode()


put

public Object put(Object key, Object value)


putAll

public void putAll(Map t)


remove

public Object remove(Object key)


toString

public String toString()
Returns:
the string expression of this


 

Copyright © 2003-2013 The Codehaus. All rights reserved.