If you want a copy of the HashMap you need to construct a new one with.
myobjectListB = new HashMap<Integer,myObject>(myobjectListA);
This will create a (shallow) copy of the map.
More Related Contents:
- How do I copy an object in Java?
- How do you clone a BufferedImage
- How to copy HashMap (not shallow copy) in Java
- Iterate through a HashMap [duplicate]
- Standard concise way to copy a file in Java?
- Java Hashmap: How to get key from value?
- How to sort Map values by key in Java?
- HashMap get/put complexity
- Sorting HashMap by values [duplicate]
- Is a Java hashmap search really O(1)?
- What is the difference between the HashMap and Map objects in Java?
- Move / Copy File Operations in Java
- How to update a value, given a key in a hashmap?
- How can I combine two HashMap objects containing the same types?
- Does Java have a HashMap with reverse lookup?
- Find and replace words/lines in a file
- How does Java order items in a HashMap or a HashTable?
- creating Hashmap from a JSON String
- Key existence check in HashMap
- Using an instance of an object as a key in hashmap, and then access it with exactly new object? [duplicate]
- HashMap and int as key
- Limiting the max size of a HashMap in Java
- Converting string arrays into Map
- Difference between HashSet and HashMap?
- Why does HashSet implementation in Sun Java use HashMap as its backing?
- How do I create some variable type alias in Java
- Comparing two hashmaps for equal values and same key sets?
- Hashmap vs Array performance
- How do I access nested HashMaps in Java?
- Explanation of HashMap#hash(int) method