Results 1 to 3 of 3

Thread: Create a map from other maps

  1. #1
    Join Date
    Oct 2011
    Posts
    1

    Default Create a map from other maps

    hi all
    I have 3 maps already created and now I need to create a new one using the data stored in those maps.

    Is there any way to create a map from other maps?

    Thanks a lot

  2. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Hello

    1) Could you post your actual code? I am assuming you have three <util:map
    2) why you are not rerefering one <util:map to the other, I need see (1) to get a complete panorama
    - Manuel Jordan

    Kill Your Pride, Share Your Knowledge With All
    The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7

    Blog


    Technical Reviewer of Apress

    • Pro SpringSource dm Server
    • Spring Enterprise Recipes: A Problem-Solution Approach
    • Spring Recipes: A Problem-Solution Approach, 2nd Edition
    • Pro Spring Integration
    • Pro Spring Batch
    • Pro Spring 3
    • Pro Spring MVC: With Web Flow
    • Pro Spring Security

  3. #3
    Join Date
    Oct 2011
    Location
    New Delhi
    Posts
    2

    Default

    Hi,

    The below code fragment might help you.

    Map<String, String> m=new HashMap<String, String>(); // create new map object

    Map m1=x;
    Map m2=y;
    Map m3=z;

    m.putAll(m1);
    m.putAll(m2);
    m.putAll(m3);

    Thanks

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •