Map接口常用的子类:
- HashMap:
extends AbstractMap<K,V> implements Map<K,V>, Cloneable, Serializable 无序存放,新的操作类,key不允许重复
- Hashtable:
extends Dictionary<K,V>implements Map<K,V>, Cloneable, java.io.Serializable无序存放,旧的操作类,key不允许重复
- TreeMap:
extends AbstractMap<K,V> implements NavigableMap<K,V>, Cloneable, java.io.Serializable可以排序的Map集合,按集合的key排序,key不允许重复
- WeakHashMap:
extends AbstractMap<K,V>implements Map<K,V>弱引用的Map集合,清除集合中不再使用的内容,使用gc进行回收
- IdentityHashMap:
extends AbstractMap<K,V> implements Map<K,V>, java.io.Serializable, Cloneable可以重复的Map集合
public interface Map<K,V>
WeakHashMap<K,V> extends AbstractMap<K,V> implements Map<K,V>
public abstract class AbstractMap<K,V> implements Map<K,V>
扫描二维码关注公众号,回复:
3570095 查看本文章
![](/qrcode.jpg)
public abstract class AbstractMap<K,V> implements Map<K,V>
public abstract class AbstractSet<E> extends AbstractCollection<E> implements Set<E>
HashSet<E> extends AbstractSet<E> implements Set<E>, Cloneable, java.io.Serializable
LinkedList<E> extends AbstractSequentialList<E>implements List<E>, Deque<E>, Cloneable, java.io.Serializable
public abstract class AbstractSequentialList<E> extends AbstractList<E>
HashSet<E> extends AbstractSet<E> implements Set<E>, Cloneable, java.io.Serializable
public abstract class AbstractSet<E> extends AbstractCollection<E> implements Set<E>