public static boolean isEquivalent(ArrayList<PathParser.PathDataNode> original,ArrayList<PathParser.PathDataNode> alternative){
  int innerStart=0;
  for (  PathParser.PathDataNode o : original) {
    boolean found=false;
    for (int i=innerStart; i < alternative.size() && !found; i++) {
      PathParser.PathDataNode n=alternative.get(i);
      if ((o.type == n.type && Arrays.equals(o.params,n.params)) || ((o.type == 'Z' || o.type == 'z') && n.type == 'L')) {
        found=true;
        innerStart=i + 1;
      }
    }
    if (!found)     return false;
  }
  return true;
}

public static boolean isEquivalent ( ArrayList < PathParser . PathDataNode > original , ArrayList < PathParser . PathDataNode > alternative ) { int innerStart = 0 ; for ( PathParser . PathDataNode o : original ) { boolean found = false ; for ( int i = innerStart ; i < alternative . size ( ) && ! found ; i ++ ) { PathParser . PathDataNode n = alternative . get ( i ) ; if ( ( o . type == n . type && Arrays . equals ( o . params , n . params ) ) || ( ( o . type == 'Z' || o . type == 'z' ) && n . type == 'L' ) ) { found = true ; innerStart = i + 1 ; } } if ( ! found ) return false ; } return true ; }
check if the given node sequences are equivalent ( in terms of incremental graphic commands ) . / / fixme this is an approximated method
