[gme-users] Re: Traversing model
Adi Mallikarjuna Reddy V
adimallikarjunareddy at gmail.com
Tue Oct 24 12:26:57 CDT 2006
1. Hashtable outConne= atomObject.getOutConnections();
2. Vector list = (Vector)outConne.get(atomName);
In the 1 statement, atomObject is the object of type JBuilderAtom or
JBuilderModel. What exactly I am trying to do in the above two statements
1. finding out the out connections (if any) for the JBuilderAtom or
I hope this can be achieved thorough the first statement.
2. Next is getting those connections from the hash table with the name of
the above object.
I hope cleared my problem.
On 10/24/06, Berthing Jesper <f35594 at danfoss.com> wrote:
> Hi Adi,
> It looks correct, if the atomName[i] is a stored as a key in the
> So if you say that it returns null, the it is not present in the
> Try: (I guess that atomName[i] is the name of your connections from the
> if(true == outConne.containsKey(atomName[i])
> Vector list = (Vector)outConne.get(atomName[i]);
> // Look for another connection
> toString() function from the HashTable class is also a good way to
> visualize the content of the HashTable.
> -----Original Message-----
> From: gme-users-bounces at list.isis.vanderbilt.edu on behalf of Adi
> Mallikarjuna Reddy V
> Sent: Mon 10/23/2006 6:39 PM
> To: A list for GME users to share thoughts and discuss bugs and fixes.
> Subject: [gme-users] Re: Traversing model
> Is anyone in the list know about the following problem.
> 1. Hashtable outConne= atomNames[i].getOutConnections();
> 2. Vector list = (Vector)outConne.get(atomName[i]);
> Are the above statements correct?
> I am getting null in the 2 statement. Is it the right way to access the
> hashtable list?
> On 10/21/06, Adi Mallikarjuna Reddy V <adimallikarjunareddy at gmail.com>
> > Hi all,
> > I got API that I required to traverse the model. But I am facing some
> > problems. When I tried accessing Connections (In and Out) of an Object
> > (Atom, Model), I am getting null as a result. I tried the following APIs
> > getOutConnections(String name) one which returns Vector
> > getOutConnections() one which returns Hashtable
> > this two functions I tried using the instance of (JBuilderAtom or
> > JBuilderModel).
> > I would be helpful if you can help me in this regard.
> > Regards
> > Adi
> gme-users mailing list
> gme-users at list.isis.vanderbilt.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gme-users