code: @Override
      public Iterator<int[]> iterator() {
          final DfState lstate = new DfState(this);
          return new Iterator<int[]>() {
              boolean hasNext;
  
              @Override
              public boolean hasNext() {
                  return hasNext || (hasNext = lstate.matchNext());
              }
  
              @Override
              public int[] next() {
                  if (!hasNext())
                      return new int[0];
                  hasNext = false;
                  return lstate.amap;
              }
  
              @Override
              public void remove() {
                  throw new IllegalArgumentException();
              }
          };
      }
docs: Adapter to current CDK {@link Pattern} that takes and iterator of an
  int[] permutation from the query to the molecule.
  @return the iterator