Groovy Documentation

groovy.lang
[Java] Class MapWithDefault

java.lang.Object
  groovy.lang.MapWithDefault
All Implemented Interfaces:
java.util.Map

public final class MapWithDefault
extends java.lang.Object

A wrapper for Map which allows a default value to be specified.

Authors:
Paul King
Since:
1.7.1


Method Summary
void clear()

boolean containsKey(java.lang.Object key)

boolean containsValue(java.lang.Object value)

java.util.Set entrySet()

boolean equals(java.lang.Object obj)

java.lang.Object get(java.lang.Object key)

int hashCode()

boolean isEmpty()

java.util.Set keySet()

static java.util.Map newInstance(java.util.Map m, Closure initClosure)

java.lang.Object put(java.lang.Object key, java.lang.Object value)

void putAll(java.util.Map m)

java.lang.Object remove(java.lang.Object key)

int size()

java.util.Collection values()

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

clear

public void clear()


containsKey

public boolean containsKey(java.lang.Object key)


containsValue

public boolean containsValue(java.lang.Object value)


entrySet

public java.util.Set entrySet()


equals

@Override
public boolean equals(java.lang.Object obj)


get

public java.lang.Object get(java.lang.Object key)


hashCode

@Override
public int hashCode()


isEmpty

public boolean isEmpty()


keySet

public java.util.Set keySet()


newInstance

public static java.util.Map newInstance(java.util.Map m, Closure initClosure)


put

public java.lang.Object put(java.lang.Object key, java.lang.Object value)


putAll

public void putAll(java.util.Map m)


remove

public java.lang.Object remove(java.lang.Object key)


size

public int size()


values

public java.util.Collection values()


 

Groovy Documentation