modify « collection « Java Collection Q&A

Home
Java Collection Q&A
1.algorithm
2.array
3.Array Byte
4.Array Char
5.Array Convert
6.Array Dimension
7.Array Integer
8.Array Object
9.Array String
10.ArrayList
11.collection
12.comparator
13.Development
14.Garbage Collection
15.Generic
16.hash
17.HashMap
18.HashTable
19.iterator
20.LinkedList
21.List
22.Map
23.queue
24.Set
25.Sort
26.tree
Java Collection Q&A » collection » modify 

1. How to modify, without any loop, a collections values to get a new collection?    stackoverflow.com

How do I, without using any loop, modify the values in a collection to get a new collection with the modified values? For example, I'm having a Collection<String> and want to surround ...

2. Collections.unmodifiablemap() and collections where reads also modify    stackoverflow.com

This is more a curiosity question than anything. Say I supply a LinkedHashMap with access ordering set to true to Collections.unmodifiableMap(). Since reads are actually modifying the map. Does it mean ...

3. Modifying a Collection while iterating using for-each loop    stackoverflow.com

If I modify a Collection while iterating over it using for-each loop, it gives ConcurrentModificationException. Is there any workaround?

4. Concepts of modifying the element in collection while iterating?    stackoverflow.com

I found this statement if a thread modifies a collection directly while it is iterating over the collection with a fail-fast iterator, the iterator will throw this exception. at

6. iterating thro collection and modifying    forums.oracle.com

Hi, Let me explain in brief what i'm trying to do. i'm having a collection which has duplicate records in it. Based on one of the field say id in each record i need to create a new collection which would have records with distinct id. so i'm iterarating thro first collection, and creating a temporary List for new set of ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.