Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Hashtable into Any (java)

Options
  • 27-04-2006 4:22pm
    #1
    Closed Accounts Posts: 521 ✭✭✭


    Ok... The last didnt get any attention... soooo..

    Any one know how to put a hashtable into an any in java?

    Any help please


Comments

  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    whats an any?


  • Registered Users Posts: 441 ✭✭robfitz


    I don't think this will compile. You should read up on Collections and Generics.
    import java.util.*;
    ....
    Hashtable hashtable = new Hashtable();
    ...
    Set keys = hashtable.keySet();
    Object[] arrayOfkeys = keys.toArray();
    ...
    Collection values = hashtable.values();
    Object[] arrayOfValues = values.toArray();
    ...
    


  • Closed Accounts Posts: 521 ✭✭✭EOA_Mushy


    its an IDL Type
    i.e. -> org.omg.CORBA.Any
    As it happens, I found an alternitive to fix my problem. Doesnt use the any though....

    Thanks Any :) way... (Sorry had to be done)


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    If you have a solution, post it.


Advertisement