快速半伪代码:
List sub=one.subList(...);List two=new XxxList(sub);sub.clear(); // since sub is backed by one, this removes all sub-list items from one
它使用标准的List实现方法,并避免了所有循环运行。clear()方法还将
removeRange()对大多数列表使用内部方法,并且效率更高。

快速半伪代码:
List sub=one.subList(...);List two=new XxxList(sub);sub.clear(); // since sub is backed by one, this removes all sub-list items from one
它使用标准的List实现方法,并避免了所有循环运行。clear()方法还将
removeRange()对大多数列表使用内部方法,并且效率更高。