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

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

Java 8 List examples from Open Source projects
This code example shows how to use the following methods: get, size
154:	long[] sortedAddresses = sorter.sort(types, inputPages, sortChannels, sortOrders, expectedPositions); 
-
157:	MaterializedResult expected = toMaterializedResult(TEST_SESSION, types, expectedPages); 
158:	MaterializedResult actual = toMaterializedResult(TEST_SESSION, types, outputPages); 
-
164:	PageBuilder pageBuilder = new PageBuilder(types); 
-
171:	for (int i = 0; i < types.size(); i++) { 
172:	Type type = types.get(i); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
59:	checkState(parameterValues.size() > node.getPosition(), "Too few parameter values"); 
60:	return coerceIfNecessary(node, parameterValues.get(node.getPosition())); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
32:	assertEquals(types.size(), actualPage.getChannelCount()); 
-
35:	assertBlockEquals(types.get(i), actualPage.getBlock(i), expectedPage.getBlock(i)); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: size
41:	return generateInternalAggregationFunction(clazz, outputType, inputTypes, typeManager, BoundVariables.builder().build(), inputTypes.size()); 
-
47:	return AggregationCompiler.generateAggregationBindableFunction(clazz, outputType, inputTypes).specialize(boundVariables, arity, typeManager); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: size
52:	checkArgument(argumentChannels.size() == signature.getArgumentTypes().size(), 
-
56:	argumentChannels.size()); 
-
58:	return newWindowFunction(argumentChannels); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
32:	 
-
35:	private static final int POSITIONS = 100; 
-
56:	Page outputPage = processor.processColumnar(SESSION, page, types); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
79:	if (fieldIndex > structFields.size()) { 
-
87:	structFields.get(fieldIndex).decodeValueInto(depth + 1, builder, slice, offset, length); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
43:	if (correlation.size() != applyNode.getCorrelation().size()) { 
-
49:	expressionAliases.put(alias, applyNode.getCorrelation().get(i++).toSymbolReference()); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get
65:	ColumnEncodingKind kind = encoding.get(streamDescriptor.getStreamId()).getColumnEncodingKind(); 
-
76:	currentReader.startStripe(dictionaryStreamSources, encoding); 
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: add, get, isEmpty, size
85:	if (entries.isEmpty()) { 
-
88:	final Entry last = entries.get(entries.size() - 1); 
-
93:	entries.add(entry); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: get, isEmpty, size
67:	return sources.isEmpty() 
-
69:	: Errors.convert(sources.get(sources.size() - 1)).toString(); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: contains, size
58:	Assert.assertEquals(3, versions.size()); 
59:	Assert.assertTrue(versions.contains("main")); 
60:	Assert.assertFalse(versions.contains("1.2")); 
61:	Assert.assertTrue(versions.contains("myfaces")); 
62:	Assert.assertTrue(versions.contains("myfaces2")); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: get, size
58:	return segments.get(segments.size() - 1); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: add
72:	customHeaders.put(name, header); 
-
74:	header.add(value); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: get, size
47:	if (joinNode.getCriteria().size() == equiCriteria.size()) { 
-
50:	AliasPair expectedEquiClause = equiCriteria.get(i++); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: isEmpty, size, toArray
87:	if (this.includePatterns.isEmpty() && this.excludePatterns.isEmpty()) { 
-
103:	return (CollectionUtils.isEmpty(list) ? null : list.toArray(new String[list.size()])); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: size
81:	return buffers.size(); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: add
45:	List<Map<String, Object>> l = new LinkedList<Map<String, Object>>(); 
-
48:	l.add(m); 
49:	kh.getKeyList().addAll(l); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: toString, add
33:	List<String> alertList = new LinkedList<String>(); 
34:	alertList.add("defaultWW"); 
-
55:	ocp.findAlertList(groupList, "ww", "topic1", "group1", alertList); 
56:	Assert.assertEquals("[defaultWW]", alertList.toString()); 
-
58:	ocp.findAlertList(groupList, "ww", "groupTopic", "group1", alertList); 
59:	Assert.assertEquals("[defaultWW, groupWW]", alertList.toString()); 
-
61:	ocp.findAlertList(groupList, "ww", "groupTopicIgnore", "group1", alertList); 
62:	Assert.assertEquals("[]", alertList.toString()); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: get
66:	ColumnEncodingKind columnEncodingKind = encoding.get(streamDescriptor.getStreamId()).getColumnEncodingKind(); 
-
77:	currentReader.startStripe(dictionaryStreamSources, encoding); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, isEmpty
54:	if (values != null && !values.isEmpty()) { 
55:	return values.get(0); 
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: get, isEmpty, size
43:	if(operands.isEmpty()) { 
-
46:	if(operands.size() != 2) { 
47:	throw new CommandLineException(getName() + " expects 2 operands but got " + operands.size()); 
-
49:	final Object left = operands.get(0).resolveValue(ctx, response); 
-
53:	final Object right = operands.get(1).resolveValue(ctx, response); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: add
35:	names.add("ECMAScript"); 
36:	names.add("ecmascript"); 
37:	names.add("JavaScript"); 
38:	names.add("javascript"); 
39:	names.add("js"); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: get, size
58:	return segments.get(segments.size() - 1); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: size
63:	if (currentCells.size() != headers.size()) { 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: get, isEmpty
60:	if (values == null || values.isEmpty()) { 
-
63:	return values.get(0); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: add
111:	indicesFailures.put(index, indexFailures); 
-
113:	indexFailures.add(failure); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: add
91:	List<V> values = new LinkedList<V>(); 
92:	values.add(value); 
93:	this.targetMap.put(key, values); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: get, size
58:	checkArgument(i >= 0 && i < columns.size(), "column index must be non-negative and less than length"); 
59:	return columns.get(i); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
75:	Block[] blocks = new Block[builders.size()]; 
-
77:	blocks[i] = builders.get(i).build(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: size
46:	this.size = shards.size(); 
Full Snippet Info
9
CodeRank
This code example shows how to use the following methods: get, size
118:	checkState(expectedKeys.size() == expectedValues.size(), "expectedKeys and expectedValues should have equal size"); 
-
129:	map.get(expectedKeys.get(i)).add(expectedValues.get(i)); 
-
134:	builder.row(expectedKeys.get(i), expectedValues.get(i)); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
56:	assertEquals(columnNames.size(), columnIds.size()); 
-
61:	assertEquals(columnNames.get(ordinal), String.valueOf(columnId)); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
91:	checkArgument(field < columnHandles.size(), "Invalid field index"); 
92:	return columnHandles.get(field).getColumnType(); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
40:	return createSequencePage(types, length, new int[types.size()]); 
-
47:	Type type = types.get(i); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
113:	if (currentBlock == blocks.size()) { 
-
116:	currentBlockMetadata = blocks.get(currentBlock); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
37:	this(nullable, nullableArguments, Collections.nCopies(nullableArguments.size(), false), methodHandle, Optional.empty(), deterministic); 
-
62:	checkArgument(nullableArguments.get(i), "argument %s marked as @IsNull is not nullable in method: %s", i, methodHandle); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
99:	checkPositionIndex(field, types.size()); 
100:	return types.get(field); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
75:	for (int i = decorators.size() - 1; i >= 0; i--) 
-
77:	f = decorators.get(i).decorate(f); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
192:	Type type = types.get(position % types.size()); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
75:	requireNonNull(initialValues, "initialValues is null"); 
-
77:	 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
254:	if ((column <= 0) || (column > columnInfo.size())) { 
-
257:	return columnInfo.get(column - 1); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
90:	Block[] blocks = new Block[types.size()]; 
-
92:	blocks[i] = createZeroBlock(types.get(i), rowsCount, constantSlice); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
164:	for (int i = 0; i < cookies.size(); ++i) 
-
170:	HttpCookie cookie = cookies.get(i); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
83:	int len = mappings.size(); 
-
86:	MappedResource<E> mr = mappings.get(i); 
Full Snippet Info
10
CodeRank
This code example shows how to use the following methods: get, size
262:	if (index == listeners.size()) 
-
265:	Response.ResponseListener listener = listeners.get(index); 
Full Snippet Info
10
CodeRank
Related Java 8 List Questions & Answers:
Other Java 8 List Examples
15:	
16:		// supported file formats
17:		public static final List<String> FILE_EXTN = Arrays.asList("jpg", "jpeg",
18:				"png");
19:	}

Read More

17:		ExpandableListAdapter listAdapter;
18:		ExpandableListView expListView;
19:		List<String> listDataHeader;
20:		HashMap<String, List<String>> listDataChild;
21:	
-
50:	
51:			// Adding child data
52:			List<String> top250 = new ArrayList<String>();
53:			top250.add("The Shawshank Redemption");
54:			top250.add("The Godfather");
-
59:			top250.add("12 Angry Men");
60:	
61:			List<String> nowShowing = new ArrayList<String>();
62:			nowShowing.add("The Conjuring");
63:			nowShowing.add("Despicable Me 2");
-
67:			nowShowing.add("The Wolverine");
68:	
69:			List<String> comingSoon = new ArrayList<String>();
70:			comingSoon.add("2 Guns");
71:			comingSoon.add("The Smurfs 2");

Read More

1:		 public List<Contact> getAllContacts() {
2:			List<Contact> contactList = new ArrayList<Contact>();
3:			// Select All Query
-
1:		 public List<Contact> getAllContacts() {
2:			List<Contact> contactList = new ArrayList<Contact>();
3:			// Select All Query
4:			String selectQuery = "SELECT  * FROM " + TABLE_CONTACTS;

Read More

See Code Examples for Java 8 List Methods: