Method
addAll
(Collection<? extends T> c)
Source from the content-addressed store, hash-verified
| 74 | } |
| 75 | |
| 76 | @Override |
| 77 | public boolean addAll(Collection<? extends T> c) |
| 78 | { |
| 79 | if(c.isEmpty()) |
| 80 | return false; |
| 81 | else if(c.size() > this.size()*3/2)//heuristic when is it faster to just add them all and sort the whole thing? |
| 82 | { |
| 83 | boolean did = super.addAll(c); |
| 84 | if(did) |
| 85 | Collections.sort(this); |
| 86 | return did; |
| 87 | } |
| 88 | else |
| 89 | { |
| 90 | for(T t : c) |
| 91 | this.add(t); |
| 92 | return true; |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | @Override |
| 97 | public boolean addAll(int index, Collection<? extends T> c) |
Callers
nothing calls this directly
Tested by
no test coverage detected