[gme-users] Re: Traversing model
f35594 at Danfoss.com
Tue Oct 24 10:02:45 CDT 2006
I think your question is clear.
You are using the functions correctly, but you need to be sure that the
atomName is a key in the HashTable.
Please use outConne.toString() and print it somewhere visible to you,
then you are able to se what the HashTable contains.
Or you can use outConne.isEmpty
y()> ()that returns true if outConne is empty (No out connections from
From: gme-users-bounces at list.isis.vanderbilt.edu
[mailto:gme-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Adi
Mallikarjuna Reddy V
Sent: 24. oktober 2006 07:57
To: A list for GME users to share thoughts and discuss bugs and fixes.
Subject: Re: [gme-users] Re: Traversing model
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
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:
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 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
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
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
> problems. When I tried accessing Connections (In and Out) of
> (Atom, Model), I am getting null as a result. I tried the
> getOutConnections(String name) one which returns Vector
> getOutConnections() one which returns Hashtable
> this two functions I tried using the instance of (JBuilderAtom
> I would be helpful if you can help me in this regard.
gme-users mailing list
gme-users at list.isis.vanderbilt.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gme-users