Best code examples for Java 8 ArrayList class (java.util.ArrayList)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 ArrayList class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Java 8 ArrayList examples from Open Source projects
This code example shows how to use the following methods:
32:	private final List<String> validationErrors = new ArrayList<String>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
42:	private final ArrayList<File> files = new ArrayList<File>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: add, get, isEmpty, size
66:	List<Throwable> errors = new ArrayList<Throwable>(); 
-
71:	errors.add(e); 
-
78:	errors.add(e); 
-
81:	if (errors.isEmpty()) { 
-
84:	if (errors.size() == 1) { 
85:	throw errors.get(0); 
-
87:	throw new MultipleFailureException(errors); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods:
40:	failures = new ArrayList<MultiTermVectorsResponse.Failure>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: add
50:	ArrayList<String> dummyArgs = new ArrayList<String>(); 
51:	dummyArgs.add("-input"); dummyArgs.add("dummy"); 
52:	dummyArgs.add("-output"); dummyArgs.add("dummy"); 
53:	dummyArgs.add("-mapper"); dummyArgs.add("dummy"); 
54:	dummyArgs.add("-reducer"); dummyArgs.add("dummy"); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: add, get, isEmpty, size
80:	List<Throwable> errors = new ArrayList<Throwable>(); 
-
86:	errors.add(e); 
-
93:	errors.add(e); 
-
96:	if (errors.isEmpty()) { 
-
99:	if (errors.size() == 1) { 
100:	throw errors.get(0); 
-
102:	throw new MultipleFailureException(errors); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: add
18:	ArrayList<Boolean> complex = new ArrayList<Boolean>(); 
19:	complex.add(true); 
20:	complex.add(false); 
21:	Cache.set("complex", complex); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods:
39:	responses = new ArrayList<GetResponse>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: isEmpty, size
35:	List<T> matches = new ArrayList<T>(); 
36:	select(registry, matches); 
37:	if (matches.isEmpty()) { 
-
40:	if (matches.size() != 1) { 
41:	throw new InvalidUserDataException(formatMultipleMatchesMessage(matches)); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: add, addAll, size, toArray
97:	ArrayList<String> execScript = new ArrayList<String>(); 
98:	execScript.add(nodeHealthScript); 
-
100:	execScript.addAll(Arrays.asList(args)); 
-
103:	.toArray(new String[execScript.size()]), null, null, scriptTimeout); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: add
21:	List<Object> sqlList = new ArrayList<Object>(); 
22:	sqlList.add("select 123"); 
23:	sqlList.add(null); 
24:	sqlList.add(""); 
-
26:	dataSource.setConnectionInitSqls(sqlList); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: add
72:	List<IndexRequestBuilder> requests = new ArrayList<>(); 
73:	requests.add(client().prepareIndex("idx", "parent", "1").setSource("{}")); 
74:	requests.add(client().prepareIndex("idx", "child", "1").setParent("1").setSource("{}")); 
75:	indexRandom(true, requests); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: add
51:	private ArrayList<ScoreFunctionBuilder> scoreFunctions = new ArrayList<ScoreFunctionBuilder>(); 
-
72:	this.scoreFunctions.add(scoreFunctionBuilder); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: add
125:	expectedNeighbors = new ArrayList<>(); 
126:	expectedNeighbors.add("u09wh"); 
127:	expectedNeighbors.add("u09wj"); 
128:	expectedNeighbors.add("u09wn"); 
129:	expectedNeighbors.add("u09tu"); 
130:	expectedNeighbors.add("u09ty"); 
131:	expectedNeighbors.add("u09ts"); 
132:	expectedNeighbors.add("u09tt"); 
133:	expectedNeighbors.add("u09tw"); 
-
136:	assertEquals(expectedNeighbors, neighbors); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: add
13:	ArrayList<String> argumentList = new ArrayList<String>(); 
14:	argumentList.add("-f"); 
15:	argumentList.add("webm"); 
16:	argumentList.add("-vcodec"); 
17:	argumentList.add("libvpx"); 
18:	argumentList.add("-crf"); 
19:	argumentList.add("22"); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: add
210:	List<ContentNegotiationStrategy> strategies = new ArrayList<ContentNegotiationStrategy>(); 
-
224:	strategies.add(strategy); 
-
230:	strategies.add(strategy); 
-
234:	strategies.add(new HeaderContentNegotiationStrategy()); 
-
238:	strategies.add(defaultNegotiationStrategy); 
-
241:	this.contentNegotiationManager = new ContentNegotiationManager(strategies); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: add
78:	List<File> moduleRoots = new ArrayList<File>(); 
79:	moduleRoots.add(env.getInstalledImage().getModulesDir()); 
-
82:	InstalledIdentity installedIdentity = InstalledIdentity.load(env.getInstalledImage(), productConfig, moduleRoots, bundleRoots); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: add
26:	names = new ArrayList<String>(); 
27:	names.add("Lauren Conrad"); 
28:	names.add("Heidi Montag"); 
29:	names.add("Kim Kardashian"); 
30:	namesAdapter = new NamesAdapter(names); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
47:	requests = new ArrayList<TermVectorRequest>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: add
13:	ArrayList<String> argumentList = new ArrayList<String>(); 
14:	argumentList.add("-f"); 
15:	argumentList.add("webm"); 
16:	argumentList.add("-vcodec"); 
17:	argumentList.add("libvpx"); 
18:	argumentList.add("-crf"); 
19:	argumentList.add("22"); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: add
34:	List<String> expected = new ArrayList<String>(); 
35:	expected.add("1"); 
36:	expected.add("2"); 
37:	expected.add("3"); 
-
39:	assertEquals(expected, result); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
42:	private List<Object> values = new ArrayList<Object>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: add
90:	List<String> coordinates = new ArrayList<String>(); 
-
92:	coordinates.add(rackName); 
93:	coordinates.add(nodeName); 
-
95:	result.setLayers(coordinates); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
36:	private List<String> values = new ArrayList<String>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: add
122:	List<byte[]> bexpected = new ArrayList<byte[]>(); 
123:	bexpected.add(bcar); 
124:	bexpected.add(bbar); 
125:	bexpected.add(null); 
-
127:	assertEquals(bexpected, bvalues); 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods:
51:	private ArrayList<FilterBuilder> filters = new ArrayList<FilterBuilder>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
60:	fields = new ArrayList<String[]>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
53:	private List<Document> documents = new ArrayList<Document>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
204:	List<Item> items = new ArrayList<Item>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
58:	this.callers = new ArrayList<JumpInsnNode>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
45:	List<String> sql = new ArrayList<String>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
11:	private List<MapCursor> cursors = new ArrayList<MapCursor>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
12:	List<Throwable> suppressed = new ArrayList<Throwable>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
24:	private List<byte[]> params = new ArrayList<byte[]>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
30:	protected List<Connection> connections = new ArrayList<Connection>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
82:	return new Relation(entity, Type.IN, null, new ArrayList<Term.Raw>(), false); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
28:	private List<Class<?>> observedAnnotatedTypes = new ArrayList<Class<?>>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
28:	private List<Class<?>> observedAnnotatedTypes = new ArrayList<Class<?>>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
38:	return new ArrayList<Object>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
37:	private final List<String> dependencies = new ArrayList<String>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
30:	private static final List<String> actions = Collections.synchronizedList(new ArrayList<String>()); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
35:	private final List<JmsDestination> topics = new ArrayList<JmsDestination>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
74:	columns = new ArrayList<Term>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
36:	private static final List<Class<?>> order = new ArrayList<Class<?>>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
42:	private static final List<String> transformedClasses = Collections.synchronizedList(new ArrayList<String>()); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
39:	private final List<ResourceInjectionConfiguration> resourceInjections = new ArrayList<ResourceInjectionConfiguration>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
35:	private final List<SetupAction> setupActions = new ArrayList<SetupAction>(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods:
48:	requirements = new ArrayList<AccessRequirement>(); 
Full Snippet Info
10
CodeRank
Related Java 8 ArrayList Questions & Answers:
Other Java 8 ArrayList Examples
21:	
22:		// Reading file paths from SDCard
23:		public ArrayList<String> getFilePaths() {
24:			ArrayList<String> filePaths = new ArrayList<String>();
25:	
-
22:		// Reading file paths from SDCard
23:		public ArrayList<String> getFilePaths() {
24:			ArrayList<String> filePaths = new ArrayList<String>();
25:	
26:			File directory = new File(
-
22:		// Reading file paths from SDCard
23:		public ArrayList<String> getFilePaths() {
24:			ArrayList filePaths = new ArrayList<String>();
25:	
26:			File directory = new File(

Read More

41:		 */
42:		private void prepareListData() {
43:			listDataHeader = new ArrayList<String>();
44:			listDataChild = new HashMap<String, List<String>>();
45:	
-
50:	
51:			// Adding child data
52:			List top250 = new ArrayList<String>();
53:			top250.add("The Shawshank Redemption");
54:			top250.add("The Godfather");
-
59:			top250.add("12 Angry Men");
60:	
61:			List nowShowing = new ArrayList<String>();
62:			nowShowing.add("The Conjuring");
63:			nowShowing.add("Despicable Me 2");
-
67:			nowShowing.add("The Wolverine");
68:	
69:			List comingSoon = new ArrayList<String>();
70:			comingSoon.add("2 Guns");
71:			comingSoon.add("The Smurfs 2");

Read More

11:	public class AddItemizedOverlay extends ItemizedOverlay<OverlayItem> {
12:		   
13:		   private ArrayList<OverlayItem> mapOverlays = new ArrayList<OverlayItem>();
14:		   
15:		   private Context context;
-
11:	public class AddItemizedOverlay extends ItemizedOverlay<OverlayItem> {
12:		   
13:		   private ArrayList mapOverlays = new ArrayList<OverlayItem>();
14:		   
15:		   private Context context;

Read More

See Code Examples for Java 8 ArrayList Methods: