[gme-users] Re: Traversing model
f35594 at Danfoss.com
Mon Oct 23 21:48:58 CDT 2006
It looks correct, if the atomName[i] is a stored as a key in the HashTable.
So if you say that it returns null, the it is not present in the HashTable.
Try: (I guess that atomName[i] is the name of your connections from the MetaModel)
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.
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
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
> I would be helpful if you can help me in this regard.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 3589 bytes
Desc: not available
Url : http://list.isis.vanderbilt.edu/pipermail/gme-users/attachments/20061023/1aef866d/attachment.bin
More information about the gme-users