七段

无论怎样,请让我先感谢一下国家。

BlogJava 首页 新随笔 联系 聚合 管理
  35 Posts :: 2 Stories :: 7 Comments :: 0 Trackbacks
Collection>
    boolean contains(Object o):return true only if has (o==null ? e==null :o.equals(e))
    boolean removeAll(Collection<?> c); remove elements in c
    boolean retainAll(Collection<?> c); remove elements not in c
    Queue VS List VS Set
    List>
        ListIterator<E> listIterator();| Iterator<E> iterator();
        next() & previous()|only has next()
        add() & remove()|only has remove()
        * you can not use list.add() during both two iteration, otherwise,ConcurrentModificationException

RandomAccess>
        Marker interface used by List implementations to indicate that they support fast (generally constant time) random access. e.g.
        for (int i=0, n=list.size(); i < n; i++)
                 list.get(i);
        runs faster than this loop:
             for (Iterator i=list.iterator(); i.hasNext(); )
                 i.next();

HashMap, HashSet, HashTable>
    HashMap(int initialCapacity, float loadFactor)        resize()
    HashSet(int initialCapacity, float loadFactor) {map = new HashMap<E,Object>(initialCapacity, loadFactor);}
    Hashtable(int initialCapacity, float loadFactor) extends Dictionary<K,V>  ; synchronized ;  rehash();
    hash = hash(key.hashCode());
    *TreeMap Red-black mechanics
posted on 2009-12-21 23:04 sevenduan 阅读(817) 评论(0)  编辑  收藏 所属分类: Java

只有注册用户登录后才能发表评论。


网站导航: