zoukankan      html  css  js  c++  java
  • List的主要实现类

    //ArrayList:List的主要实现类
    	/*
    	 * List中相对于Collection,新增加的方法
    	 *  void add(int index, Object ele):在指定的索引位置index添加元素ele
    		boolean addAll(int index, Collection eles)
    		Object get(int index):获取指定索引的元素
    		Object remove(int index):删除指定索引位置的元素
    		Object set(int index, Object ele):设置指定索引位置的元素为ele
    		int indexOf(Object obj):返回obj在集合中首次出现的位置。没有的话,返回-1
    		int lastIndexOf(Object obj):返回obj在集合中最后一次出现的位置.没有的话,返回-1
    		List subList(int fromIndex, int toIndex):返回从fromIndex到toIndex结束的左闭右开一个子list
    		
    		List常用的方法:增(add(Object obj)) 删(remove) 改(set(int index,Object obj))
    					查(get(int index)) 插(add(int index, Object ele)) 长度(size())
    	 */
    
  • 相关阅读:
    面试题 04.03. 特定深度节点链表
    WordStack
    libevent源码解析2
    libevent源码解析1
    Live2d Test Env
    Live2d Test Env
    Live2d Test Env
    Live2d Test Env
    最短路径(dijkstra 与 Floyd)
    LR怎么并行的
  • 原文地址:https://www.cnblogs.com/liyao0312/p/11631196.html
Copyright © 2011-2022 走看看