protected Boolean compareList( // was BooleanValue
      ArrayList firstList,
      Object val1,
      boolean lessThan,
      boolean permissive,
      boolean overallTrue) // If true we are searching for at least one TRUE result, else at least one FALSE.
    {
      if (tc.isAnyTracingEnabled() && tc.isEntryEnabled())
        tc.entry(cclass, 
                 "compareList", 
                 new Object[] { firstList, 
                                val1, 
                                new Boolean(lessThan), 
                                new Boolean(permissive), 
                                new Boolean(overallTrue) });
    
      ArrayList secondList = null;
      if(val1 instanceof ArrayList)
        secondList = (ArrayList)val1;
      
      Boolean finalReturn = null;
      // We need to compare each item in each list with each other
      if(firstList != null)
      {
        Iterator iterList1 = firstList.iterator();
        
        while(iterList1.hasNext())
        {
          Object firstListVal = (Object)iterList1.next();

          String firstStrVal = getStringFromNode(firstListVal);
          
          // Process the case where the second parameter is also a list 
          if(secondList != null)
          {
            Iterator iterList2 = secondList.iterator();
            
            while(iterList2.hasNext())
            {
              Object secListVal = (Object)iterList2.next();
              String secStrVal = null;
              if (secListVal instanceof Node)
                secStrVal = getStringFromNode((Node)secListVal);              
                         
              Object firstVal = (firstStrVal != null) ? firstStrVal : firstListVal;
              Object secondVal = (secStrVal != null) ? secStrVal : secListVal;
              
              finalReturn = 
                compareListValues(firstVal, 
                                  secondVal, 
                                  lessThan, 
                                  permissive,
                                  overallTrue);              
              
              if(finalReturn != null)
              {
                if (tc.isAnyTracingEnabled() && tc.isEntryEnabled())
                  tc.exit(cclass, "compareList", finalReturn);                      
                return finalReturn; // Boolean.TRUE
              }
            }
          } // eof processing where second parameter is a list also
          else
          {
            // In this case the second parameter is a single value
            String secStrVal = null;
            if (val1 instanceof Node)
              secStrVal = getStringFromNode((Node)val1);
            Object firstVal = (firstStrVal != null) ? firstStrVal : firstListVal;
            Object secondVal = (secStrVal != null) ? secStrVal : val1;
            
            finalReturn = 
              compareListValues(firstVal, 
                                secondVal, 
                                lessThan, 
                                permissive,
                                overallTrue);
            if(finalReturn != null)
            {
              if (tc.isAnyTracingEnabled() && tc.isEntryEnabled())
                tc.exit(cclass, "compareList", finalReturn);                      
              return finalReturn; // Boolean.TRUE
            }
          } // eof procesing where second param is single value
        }
      }
      if (tc.isAnyTracingEnabled() && tc.isEntryEnabled())
        tc.exit(cclass, "compareList", finalReturn);       
      return finalReturn;
    }
protected Boolean compareList ( ArrayList firstList , Object val1 , boolean lessThan , boolean permissive , boolean overallTrue ) { if ( tc . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "compareList" , new Object [ ] { firstList , val1 , new Boolean ( lessThan ) , new Boolean ( permissive ) , new Boolean ( overallTrue ) } ) ; ArrayList secondList = null ; if ( val1 instanceof ArrayList ) secondList = ( ArrayList ) val1 ; Boolean finalReturn = null ; if ( firstList != null ) { Iterator iterList1 = firstList . iterator ( ) ; while ( iterList1 . hasNext ( ) ) { Object firstListVal = ( Object ) iterList1 . next ( ) ; String firstStrVal = getStringFromNode ( firstListVal ) ; if ( secondList != null ) { Iterator iterList2 = secondList . iterator ( ) ; while ( iterList2 . hasNext ( ) ) { Object secListVal = ( Object ) iterList2 . next ( ) ; String secStrVal = null ; if ( secListVal instanceof Node ) secStrVal = getStringFromNode ( ( Node ) secListVal ) ; Object firstVal = ( firstStrVal != null ) ? firstStrVal : firstListVal ; Object secondVal = ( secStrVal != null ) ? secStrVal : secListVal ; finalReturn = compareListValues ( firstVal , secondVal , lessThan , permissive , overallTrue ) ; if ( finalReturn != null ) { if ( tc . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . exit ( cclass , "compareList" , finalReturn ) ; return finalReturn ; } } } else { String secStrVal = null ; if ( val1 instanceof Node ) secStrVal = getStringFromNode ( ( Node ) val1 ) ; Object firstVal = ( firstStrVal != null ) ? firstStrVal : firstListVal ; Object secondVal = ( secStrVal != null ) ? secStrVal : val1 ; finalReturn = compareListValues ( firstVal , secondVal , lessThan , permissive , overallTrue ) ; if ( finalReturn != null ) { if ( tc . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . exit ( cclass , "compareList" , finalReturn ) ; return finalReturn ; } } } } if ( tc . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . exit ( cclass , "compareList" , finalReturn ) ; return finalReturn ; }
Evaluate a comparison between a list and a second value. Other parameters are a flag saying
whether the test is equality (false) or less-than (true), and a flag saying whether
conversion rules are strict (false) or permissive (true).

@param firstList
@param val1
@param lessThan
@param permissive
@param overallTrue
@return