edu.rice.cs.plt.collect
Class EmptyMap<K,V>
java.lang.Object
edu.rice.cs.plt.collect.EmptyMap<K,V>
- All Implemented Interfaces:
- LambdaMap<K,V>, Lambda<K,V>, java.io.Serializable, java.util.Map<K,V>
public class EmptyMap<K,V>
- extends java.lang.Object
- implements LambdaMap<K,V>, java.io.Serializable
An empty LambdaMap.
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from interface java.util.Map |
java.util.Map.Entry<K,V> |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
INSTANCE
public static final EmptyMap<java.lang.Object,java.lang.Object> INSTANCE
value
public V value(K key)
- Specified by:
value in interface Lambda<K,V>
get
public V get(java.lang.Object key)
- Specified by:
get in interface java.util.Map<K,V>
size
public int size()
- Specified by:
size in interface java.util.Map<K,V>
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty in interface java.util.Map<K,V>
containsKey
public boolean containsKey(java.lang.Object o)
- Specified by:
containsKey in interface java.util.Map<K,V>
containsValue
public boolean containsValue(java.lang.Object o)
- Specified by:
containsValue in interface java.util.Map<K,V>
keySet
public EmptySet<K> keySet()
- Specified by:
keySet in interface LambdaMap<K,V>- Specified by:
keySet in interface java.util.Map<K,V>
values
public EmptySet<V> values()
- Specified by:
values in interface java.util.Map<K,V>
entrySet
public EmptySet<java.util.Map.Entry<K,V>> entrySet()
- Specified by:
entrySet in interface java.util.Map<K,V>
put
public V put(K key,
V value)
- Specified by:
put in interface java.util.Map<K,V>
putAll
public void putAll(java.util.Map<? extends K,? extends V> t)
- Specified by:
putAll in interface java.util.Map<K,V>
remove
public V remove(java.lang.Object key)
- Specified by:
remove in interface java.util.Map<K,V>
clear
public void clear()
- Specified by:
clear in interface java.util.Map<K,V>
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Specified by:
equals in interface java.util.Map<K,V>- Overrides:
equals in class java.lang.Object
hashCode
public int hashCode()
- Specified by:
hashCode in interface java.util.Map<K,V>- Overrides:
hashCode in class java.lang.Object
make
public static <K,V> EmptyMap<K,V> make()
- Return a singleton, cast to the appropriate type.