Reputation: 5736
if I have only inserted one class object, which has an array of another class objects (say Integer). Now if I want to find the largest among them in the "when" part, how could you do that?
I can loop through them in the "then" part, but thats not utilising the Reta tree optimization. So thats not an option for me.
There is a getter in this class to return a member class object by passing in an index. I do not want to change the java code part in my first attempt, so how would you write the "when part" to find the largest one?
My second attempt is to change the java code part to insert each of these member class objects so that they can be easily accessible in the "when" part, but is this the only option I have?
Thank you!
Upvotes: 0
Views: 618
Reputation: 24202
you can try the from syntax (4.8.3.7.2), something like:
$outerObject : someObject
$maxInner : Integer from from $outerObject.items
not (Integer (intValue > $maxInner.intValue) from $outerObject.items)
Upvotes: 1