AbstractList方法学习

 

public List<E> subList(int fromIndex, int toIndex) {
  return (this instanceof RandomAccess ?
  new RandomAccessSubList<>(this, fromIndex, toIndex) :
  new SubList<>(this, fromIndex, toIndex));
}

注释:用来返回list一部分的视图.

posted @ 2017-10-20 18:12  devilNC  阅读(165)  评论(0)    收藏  举报