code: private static boolean compareOrdered(DualKey dualKey, LinkedList<DualKey> stack, Collection visited)
      {
          Collection col1 = (Collection) dualKey._key1;
          Collection col2 = (Collection) dualKey._key2;
  
          if (ProxyHelper.isProxyCollection(col1) || ProxyHelper.isProxyCollection(col2))
          {
              return false;
          }
  
          if (col1.size() != col2.size())
          {
              return false;
          }
  
          Iterator i1 = col1.iterator();
          Iterator i2 = col2.iterator();
  
          while (i1.hasNext())
          {
              DualKey dk = new DualKey(i1.next(), i2.next());
              if (!visited.contains(dk))
              {
                  stack.addFirst(dk);
              }
          }
          return true;
      }
docs: Compare two Collections that must be same length and in same order.
  
  @param dualKey
  DualKey represents the two Collections to compare
  @param visited
  Collection of objects already compared (prevents cycles)
  @param stack
  add items to compare to the Stack (Stack versus recursion)
  @return boolean false if the Collections are not the same length,
  otherwise place collection items on Stack to be further compared.