Implementing a Vector
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Massimo_Redaelli
Posted On:   Wednesday, January 2, 2002 08:07 AM

I'm using JBuilder 4 with Visibroker. I need to create a simple Vector class, something like interface Vector { Object get(in long n); void put(in Object o); }; I need it to be generic, like java.util.Vector, and I need to be able to put into the same vector different kinds of object. But I cannot manage to get it working. I use a java.util.Vector to store objects on server side. Then I try to convert them back from java.lang.Object to something implementing org.omg.CORBA.Object, but of course I don't know the right class: it has to be generic :) So I cannot return them with get() . Any suggestion? Thanx!    More>>

I'm using JBuilder 4 with Visibroker. I need to create a simple Vector class, something like


			
interface Vector {
Object get(in long n);
void put(in Object o);
};


I need it to be generic, like java.util.Vector, and I need to be able to put into the same vector different kinds of object. But I cannot manage to get it working.



I use a java.util.Vector to store objects on server side. Then I try to convert them back from java.lang.Object to something implementing org.omg.CORBA.Object, but of course I don't know the right class: it has to be generic :)
So I cannot return them with
get()
.

Any suggestion? Thanx!    <<Less
About | Sitemap | Contact