8 Replies Latest reply on Mar 19, 2012 2:46 AM by 858257

    Create Immutable HashMap

      Hello - I have a situation where in I need to send a hashmap as an argument to another method. And I do not have any control over this other method and I have to make sure that the HashMap I am passing should not be updated.

      I could have used Collections.unModifiableMap() to a get an unmodifiableMap but, the I need to specifically pass HashMap and not just any Map.

      Please let me know how to achieve this.