|
|||||||||
| Home >> All >> java >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.util
Class Collections.EmptyMap

java.lang.Objectjava.util.AbstractMap
java.util.Collections.EmptyMap
- All Implemented Interfaces:
- Map, java.io.Serializable
- Enclosing class:
- Collections
- private static final class Collections.EmptyMap
- extends AbstractMap
- implements java.io.Serializable
- extends AbstractMap
The implementation of Collections.EMPTY_MAP 55 . This class name is required
for compatibility with Sun's JDK serializability.
| Nested Class Summary |
| Nested classes inherited from class java.util.AbstractMap |
AbstractMap.BasicMapEntry |
| Nested classes inherited from class java.util.Map |
Map.Entry |
| Field Summary | |
private static long |
serialVersionUID
Compatible with JDK 1.4. |
| Fields inherited from class java.util.AbstractMap |
ENTRIES, keys, KEYS, values, VALUES |
| Constructor Summary | |
(package private) |
Collections.EmptyMap()
A private constructor adds overhead. |
| Method Summary | |
boolean |
containsKey(java.lang.Object key)
No entries! |
boolean |
containsValue(java.lang.Object value)
No entries! |
Set |
entrySet()
There are no entries. |
boolean |
equals(java.lang.Object o)
Equal to all empty maps. |
java.lang.Object |
get(java.lang.Object o)
No mappings, so this returns null. |
int |
hashCode()
The hashcode is always 0. |
Set |
keySet()
No entries. |
java.lang.Object |
remove(java.lang.Object o)
Remove always succeeds, with null result. |
int |
size()
Size is always 0. |
java.lang.String |
toString()
The string never changes. |
Collection |
values()
No entries. |
| Methods inherited from class java.util.AbstractMap |
clear, clone, equals, hashCode, isEmpty, put, putAll |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
serialVersionUID
private static final long serialVersionUID
- Compatible with JDK 1.4.
- See Also:
- Constant Field Values
| Constructor Detail |
Collections.EmptyMap
Collections.EmptyMap()
- A private constructor adds overhead.
| Method Detail |
entrySet
public Set entrySet()
- There are no entries.
- Specified by:
entrySetin interfaceMap- Specified by:
entrySetin classAbstractMap
containsKey
public boolean containsKey(java.lang.Object key)
- No entries!
- Specified by:
containsKeyin interfaceMap- Overrides:
containsKeyin classAbstractMap
containsValue
public boolean containsValue(java.lang.Object value)
- No entries!
- Specified by:
containsValuein interfaceMap- Overrides:
containsValuein classAbstractMap
equals
public boolean equals(java.lang.Object o)
- Equal to all empty maps.
- Specified by:
equalsin interfaceMap- Overrides:
equalsin classAbstractMap
get
public java.lang.Object get(java.lang.Object o)
- No mappings, so this returns null.
- Specified by:
getin interfaceMap- Overrides:
getin classAbstractMap
hashCode
public int hashCode()
- The hashcode is always 0.
- Specified by:
hashCodein interfaceMap- Overrides:
hashCodein classAbstractMap
keySet
public Set keySet()
- No entries.
- Specified by:
keySetin interfaceMap- Overrides:
keySetin classAbstractMap
remove
public java.lang.Object remove(java.lang.Object o)
- Remove always succeeds, with null result.
- Specified by:
removein interfaceMap- Overrides:
removein classAbstractMap
size
public int size()
- Size is always 0.
- Specified by:
sizein interfaceMap- Overrides:
sizein classAbstractMap
values
public Collection values()
- No entries. Technically, EMPTY_SET, while more specific than a general
Collection, will work. Besides, that's what the JDK uses!
- Specified by:
valuesin interfaceMap- Overrides:
valuesin classAbstractMap
toString
public java.lang.String toString()
- The string never changes.
- Overrides:
toStringin classAbstractMap
|
|||||||||
| Home >> All >> java >> [ util overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC