Tag: collections

3256 Differences between HashMap and Hashtable? 2008-09-02T20:12:00.117

2686 How to efficiently iterate over each entry in a Java Map? 2008-09-05T21:12:48.370

2674 When to use LinkedList over ArrayList in Java? 2008-11-27T01:36:35.567

2307 Initialization of an ArrayList in one line 2009-06-17T04:10:20.000

1436 Sort a Map<Key, Value> by values 2008-09-20T21:03:23.403

1066 Iterating through a Collection, avoiding ConcurrentModificationException when modifying (removing) in loop 2008-10-21T23:23:33.123

972 How can I initialise a static Map? 2009-02-03T15:41:33.080

840 Converting 'ArrayList<String> to 'String[]' in Java 2010-10-28T11:30:53.847

785 How to directly initialize a HashMap (in a literal way)? 2011-07-23T18:40:33.140

711 Efficiency of Java "Double Brace Initialization"? 2009-05-29T03:40:13.207

630 How to make a new List in Java 2009-05-13T15:12:45.443

624 Difference between <? super T> and <? extends T> in Java 2010-12-03T06:57:06.297

588 How to convert a Map to List in Java? 2009-06-22T11:45:28.380

588 How to convert an Array to a Set in Java 2010-06-17T18:23:56.460

582 What is the best way to filter a Java Collection? 2008-09-23T16:26:26.383

558 How to initialize HashSet values by construction? 2010-01-11T12:31:50.687

538 Easiest way to convert a List to a Set in Java 2009-09-15T22:02:35.920

482 How to convert List<Integer> to int[] in Java? 2009-06-06T20:20:18.270

480 Ways to iterate over a list in Java 2013-08-23T19:00:14.920

437 How to convert comma-separated String to ArrayList? 2011-09-20T16:40:02.903

427 C# Set collection? 2008-10-08T16:33:59.270

427 How do I remove repeated elements from ArrayList? 2008-10-15T08:05:26.113

420 Why is there no SortedList in Java? 2012-01-04T10:35:53.513

415 Why there is no ConcurrentHashSet against ConcurrentHashMap 2011-08-09T07:14:29.087

383 Retrieving a List from a java.util.stream.Stream in Java 8 2013-02-12T10:26:08.783

376 Is there a short contains function for lists? 2012-10-17T12:19:53.703

374 What are the reasons why Map.get(Object key) is not (fully) generic 2009-05-13T11:28:30.927

368 Is it better to return null or empty collection? 2009-12-28T15:30:29.027

351 Linq .Any VS .Exists - What's the difference? 2009-05-18T19:35:35.583

331 Get nth character of a string in Swift programming language 2014-06-07T01:50:31.830

330 Easy way to convert Iterable to Collection 2011-06-20T19:56:44.823

328 HashSet vs. List performance 2008-09-29T21:24:15.297

318 How to convert Set to Array? 2013-11-19T11:06:39.560

316 How can I turn a List of Lists into a List in Java 8? 2014-08-05T19:48:00.293

291 How to sort an ArrayList? 2013-04-27T12:48:16.133

290 Most efficient way to increment a Map value in Java 2008-09-17T09:10:11.843

288 What is the Simplest Way to Reverse an ArrayList? 2012-05-26T13:05:04.163

284 Java 8 Distinct by property 2014-05-16T15:40:12.070

271 How to convert int[] into List<Integer> in Java? 2009-07-02T11:47:36.243

257 Java Ordered Map 2009-03-19T18:11:01.627

253 .NET HashTable Vs Dictionary - Can the Dictionary be as fast? 2009-07-06T20:46:22.627

249 How to randomize two ArrayLists in the same fashion? 2010-11-19T20:10:52.187

249 Getting an element from a Set 2011-09-02T12:22:54.847

245 The opposite of Intersect() 2011-04-11T10:53:44.420

241 Difference between a Seq and a List in Scala 2012-06-02T23:13:48.910

240 Python: defaultdict of defaultdict? 2011-02-17T14:04:22.593

240 How to quickly and conveniently create a one element arraylist 2013-12-03T18:29:25.577

239 How to convert a Collection to List? 2009-02-24T01:56:11.413

231 How to clone ArrayList and also clone its contents? 2009-04-03T20:40:28.050

224 Why doesn't java.util.Set have get(int index)? 2009-04-20T19:19:40.460

220 How do I overload the square-bracket operator in C#? 2008-11-13T19:20:22.633

220 Java: Get first item from a collection 2009-11-04T02:22:51.643

216 Iterating through a list in reverse order in java 2010-01-20T15:28:24.430

215 Java - How to create new Entry (key, value) 2010-06-24T13:50:48.023

212 Is there an AddRange equivalent for a HashSet in C# 2013-03-07T09:09:33.760

210 How to get the first element of the List or Set? 2012-01-16T15:37:48.787

207 Cost of len() function 2009-07-12T04:31:02.693

207 What is difference between Collection.stream().forEach() and Collection.forEach()? 2014-04-22T11:59:24.120

204 Does List<T> guarantee insertion order? 2009-06-25T10:05:22.757

204 How to sort an ArrayList in Java 2013-08-26T10:20:05.337

202 How do you cast a List of supertypes to a List of subtypes? 2009-06-01T03:25:18.440

201 Simple way to find if two different lists contain exactly the same elements? 2009-07-02T17:23:59.833

197 Google Guava vs. Apache Commons 2009-09-18T13:05:16.190

195 Most concise way to convert a Set<String> to a List<String> 2010-02-23T15:54:13.403

195 Collections.emptyList() vs. new instance 2011-04-05T13:02:38.110

195 How to easily initialize a list of Tuples? 2011-11-03T22:01:45.193

189 How to get a reversed list view on a list in Java? 2010-10-18T19:45:27.867

185 Dictionary returning a default value if the key does not exist 2010-04-08T16:04:18.553

184 Which is more efficient, a for-each loop, or an iterator? 2010-01-21T21:52:10.063

178 Is there a way to get a collection of all the Models in your Rails app? 2009-02-05T16:10:15.437

177 Properly removing an Integer from a List<Integer> 2010-12-26T14:25:35.850

172 Size-limited queue that holds last N elements in Java 2011-03-31T11:09:08.237

166 What is the best way to clone/deep copy a .NET generic Dictionary<string, T>? 2008-09-26T13:46:51.240

158 Is there a built-in method to compare collections? 2008-09-04T11:17:57.747

157 Why is HashSet<Point> so much slower than HashSet<string>? 2017-09-10T16:07:55.203

155 How do I sort a Set to a List in Java? 2009-04-11T15:26:06.840

154 Sorted collection in Java 2009-01-06T12:02:05.880

154 Convert JSON to Map 2009-01-14T16:00:38.773

151 Creating a blocking Queue<T> in .NET? 2009-02-09T22:02:34.327

150 how to get the one entry from hashmap without iterating 2009-10-02T13:09:02.247

147 How can I sort a List alphabetically? 2009-04-02T07:42:15.347

147 Recreating a Dictionary from an IEnumerable<KeyValuePair<>> 2010-04-14T10:31:36.963

146 What Java 8 Stream.collect equivalents are available in the standard Kotlin library? 2016-01-06T20:34:35.013

145 How to count the number of occurrences of an element in a List 2009-02-03T03:29:13.620

145 Difference between HashSet and HashMap? 2010-05-05T13:56:41.453

144 Comparing two collections for equality irrespective of the order of items in them 2008-09-08T16:36:15.840

144 Convert List<DerivedClass> to List<BaseClass> 2009-11-30T00:31:21.720

143 count vs length vs size in a collection 2008-11-18T23:18:33.460

143 Java Map equivalent in C# 2009-03-26T23:30:14.923

142 Big-O summary for Java Collections Framework implementations? 2009-02-18T04:26:23.673

139 IList vs IEnumerable for Collections on Entities 2008-12-18T02:17:34.010

139 Immutable vs Unmodifiable collection 2012-01-17T09:39:19.813

138 Collection<T> versus List<T> what should you use on your interfaces? 2008-11-07T10:28:08.003

137 Are there strongly-typed collections in Objective-C? 2009-05-11T15:27:22.350

136 Best practice to validate null and empty collection in Java 2012-10-04T05:54:21.553

136 Should I return a Collection or a Stream? 2014-07-10T12:42:48.047

134 Select N random elements from a List<T> in C# 2008-09-07T03:12:28.120

134 Why aren't Java Collections remove methods generic? 2008-09-19T19:26:55.330

134 What is the most efficient Java Collections library? 2009-03-10T11:48:07.240