Code examples for ArrayList

Codota analyzed 7,668,838 open source code samples to find the most common, credible and clear examples.
You can now enable Codota on your own code to easily search and navigate your Java codebase.
32:	private final List<String> validationErrors = new ArrayList<String>(); 
Full Snippet Info
10
CodeRank
42:	private final ArrayList<File> files = new ArrayList<File>(); 
Full Snippet Info
10
CodeRank
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
40:	failures = new ArrayList<MultiTermVectorsResponse.Failure>(); 
Full Snippet Info
10
CodeRank
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
39:	responses = new ArrayList<GetResponse>(); 
Full Snippet Info
10
CodeRank
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
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
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
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
47:	requests = new ArrayList<TermVectorRequest>(); 
Full Snippet Info
10
CodeRank
52:	List<HttpMessageConverter<?>> converters = new ArrayList<HttpMessageConverter<?>>(); 
53:	converters.add(new StringHttpMessageConverter()); 
54:	converters.add(new MappingJackson2HttpMessageConverter()); 
-
57:	this.restTemplate.setMessageConverters(converters); 
Full Snippet Info
8
CodeRank
76:	List<ResourceResolver> resolvers = new ArrayList<ResourceResolver>(); 
77:	resolvers.add(versionResolver); 
78:	resolvers.add(new PathResourceResolver()); 
79:	this.handler.setResourceResolvers(resolvers); 
Full Snippet Info
8
CodeRank
85:	List<Integer> positions = new ArrayList<>(); 
-
92:	positions.add(i); 
-
104:	if (array.getPositionCount() == positions.size()) { 
-
109:	if (!positions.isEmpty()) { 
110:	entrySize = (int) Math.ceil(sizeAfterRemove / (double) positions.size()); 
-
112:	BlockBuilder blockBuilder = type.createBlockBuilder(new BlockBuilderStatus(), positions.size(), entrySize); 
-
114:	for (int position : positions) { 
Full Snippet Info
8
CodeRank
42:	private List<Object> values = new ArrayList<Object>(); 
Full Snippet Info
10
CodeRank
46:	List<HandlerMethodArgumentResolver> resolvers = new ArrayList<HandlerMethodArgumentResolver>(); 
47:	resolvers.add(new RequestParamMethodArgumentResolver(false)); 
48:	resolvers.add(new RequestHeaderMethodArgumentResolver(null)); 
49:	resolvers.add(new RequestParamMethodArgumentResolver(true)); 
-
53:	CompositeUriComponentsContributor contributor = new CompositeUriComponentsContributor(resolvers); 
Full Snippet Info
8
CodeRank
54:	List<HttpMessageConverter<?>> converters = new ArrayList<HttpMessageConverter<?>>(); 
55:	converters.add(new StringHttpMessageConverter()); 
56:	converters.add(new MappingJackson2HttpMessageConverter()); 
-
59:	this.restTemplate.setMessageConverters(converters); 
Full Snippet Info
8
CodeRank
53:	List<ResourceResolver> resolvers = new ArrayList<>(); 
54:	resolvers.add(new CachingResourceResolver(this.cache)); 
55:	resolvers.add(new PathResourceResolver()); 
56:	this.chain = new DefaultResourceResolverChain(resolvers); 
Full Snippet Info
8
CodeRank
94:	List list = new ArrayList(); 
95:	list.add(s1); 
96:	list.add(s2); 
97:	list.add(s3); 
98:	String str = new ToStringCreator(this).append("myLetters", list).toString(); 
Full Snippet Info
8
CodeRank
36:	private List<String> values = new ArrayList<String>(); 
Full Snippet Info
10
CodeRank