Is there anyway to iterate over a Java List object from Jess?
I have a Java object that I store in a Jess variable:
engine.getGlobalContext().setVariable(bwapi, new Value(bwapi));
one of the methods that can be called on bwapi returns a Java ArrayList,
and I would like to be able to iterate
That create$ call is creating a list with one element, the ArrayList.
Iterating over the Jess list returns just the ArrayList - not what you want.
In recent versions of Jess, the foreach function actually knows about
Iterators and the like, so you can iterate over the ArrayList directly: