Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Hashtable into Any (java)

  • 27-04-2006 04: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, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    whats an any?


  • Registered Users, Registered Users 2 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, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    If you have a solution, post it.


Advertisement