Java基础(38)AbstractMap类

  AbstractMap类的子类有HashMap(其子类是LinkedHashMap)、TreeMap、EnumMap、WeakHashMap和IdentityHashMap。

  1.HashMap

  (1)方法声明:

public class HashMap<K,V> extends AbstractMap<K,V> implements Map<K,V>, Cloneable, Serializable {...}

  

  2.LinkedHashMap

  (1)方法声明

public class LinkedHashMap<K,V> extends HashMap<K,V> implements Map<K,V>{...}

 

  3.TreeMap

  (1)方法声明:

public class TreeMap<K,V> extends AbstractMap<K,V> implements NavigableMap<K,V>, Cloneable, java.io.Serializable

 

  4.EnumMap

  (1)方法声明

public class EnumMap<K extends Enum<K>, V> extends AbstractMap<K, V> implements java.io.Serializable, Cloneable

 

  5.WeakHashMap

  (1)方法声明

public class WeakHashMap<K,V> extends AbstractMap<K,V> implements Map<K,V> {

 

  6.IdentityHashMap

  (1)方法声明

public class IdentityHashMap<K,V> extends AbstractMap<K,V> implements Map<K,V>, java.io.Serializable, Cloneable

 

posted @ 2018-09-03 16:17  BigJunOba  阅读(176)  评论(0编辑  收藏  举报