code: public Node[] toArray() {
          // logger.info("count " + count);
          Node[] array = new Node[count];
          int i = 0;
  
          // System.out.print("node:");
          Iterator it = iterator();
          while (it.hasNext()) {
              Entry e = (Entry) it.next();
              // System.out.print(" " + e.getIndex());
              array[i] = new Node();
              array[i].index = e.getIndex();
              array[i].value = e.getValue();
              i++;
          }
          // System.out.print("\n");
          return array;
      }
docs: end constructor