Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(764)

Side by Side Diff: base/android/java/src/org/chromium/base/CollectionUtil.java

Issue 1641513004: Update //base to chromium 9659b08ea5a34f889dc4166217f438095ddc10d2 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.base; 5 package org.chromium.base;
6 6
7 import java.util.ArrayList; 7 import java.util.ArrayList;
8 import java.util.Collections; 8 import java.util.Collections;
9 import java.util.HashSet; 9 import java.util.HashSet;
10 10
(...skipping 13 matching lines...) Expand all
24 return set; 24 return set;
25 } 25 }
26 26
27 @SafeVarargs 27 @SafeVarargs
28 public static <E> ArrayList<E> newArrayList(E... elements) { 28 public static <E> ArrayList<E> newArrayList(E... elements) {
29 ArrayList<E> list = new ArrayList<E>(elements.length); 29 ArrayList<E> list = new ArrayList<E>(elements.length);
30 Collections.addAll(list, elements); 30 Collections.addAll(list, elements);
31 return list; 31 return list;
32 } 32 }
33 33
34 @VisibleForTesting
34 public static <E> ArrayList<E> newArrayList(Iterable<E> iterable) { 35 public static <E> ArrayList<E> newArrayList(Iterable<E> iterable) {
35 ArrayList<E> list = new ArrayList<E>(); 36 ArrayList<E> list = new ArrayList<E>();
36 for (E element : iterable) { 37 for (E element : iterable) {
37 list.add(element); 38 list.add(element);
38 } 39 }
39 return list; 40 return list;
40 } 41 }
41 } 42 }
OLDNEW
« no previous file with comments | « base/android/java/src/org/chromium/base/BuildInfo.java ('k') | base/android/java/src/org/chromium/base/Log.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698