黑马程序员技术交流社区
标题:
集合框架
[打印本页]
作者:
zhangyangLengen
时间:
2014-11-2 21:40
标题:
集合框架
Map接口中Map.Entry<K,V>实现的内部原理是??
作者:
feng_0207
时间:
2014-11-2 22:09
Map的源码如下:
public abstract interface Map<K, V>
{
public abstract int size();
public abstract boolean isEmpty();
public abstract boolean containsKey(Object paramObject);
public abstract boolean containsValue(Object paramObject);
public abstract V get(Object paramObject);
public abstract V put(K paramK, V paramV);
public abstract V remove(Object paramObject);
public abstract void putAll(Map<? extends K, ? extends V> paramMap);
public abstract void clear();
public abstract Set<K> keySet();
public abstract Collection<V> values();
public abstract Set<Entry<K, V>> entrySet();
public abstract boolean equals(Object paramObject);
public abstract int hashCode();
public static abstract interface Entry<K, V>
{
public abstract K getKey();
public abstract V getValue();
public abstract V setValue(V paramV);
public abstract boolean equals(Object paramObject);
public abstract int hashCode();
}
}
复制代码
作者:
huoxy
时间:
2014-11-2 22:43
都开始看Java源码了,牛!
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/)
黑马程序员IT技术论坛 X3.2