)。
修改队列,多个线程是无法使用队列中的元素的。取而代之,使用线程安全类
方法(offer,poll,remove,add)的时间复杂度为:方法为线性时间;遍历方法为常量时间,peek,element,size。
方法概况:
, ,
nofollow" style="text-decoration:none;color:rgb(76, nofollow" style="text-decoration:none;color:rgb(76, nofollow" style="text-decoration:none;color:rgb(76, nofollow" style="text-decoration:none;color:rgb(76, nofollow" style="text-decoration:none;color:rgb(76, nofollow" style="text-decoration:none;color:rgb(76,135);">retainAll