yeah, I have thought about it. But if I use function, I have to write three
for loops. like:

/*function Boolean findSubject(Request request) {

        Pointer sPointer = request.getSubjectPath(); 
        Pointer aPointer = request.getAuthorTable();
        for( int i = 0; i < p.length; i++ ) {
                for( int j = 0; j < p[i].length; j++) {
                        for( Iterator iter = aPointer.iterator(); 
iter.hasNext(); )
                                // if..else
                        
                }
        }       
}*/

sPointer is a int[][]; aPointer is a ArrayList. I need to find which element
in aPointer has the same value in sPointer.

If I use function, I think it the efficiency is not so good. Do you have any
other ideas?

--
View this message in context: 
http://drools.46999.n3.nabble.com/rule-with-array-tp3747680p3747895.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to