code: @Override
      @SuppressWarnings("unchecked")
      public <T> T[] toArray(T[] a) {
          int size = size();
          if (a.length < size) {
              a = (T[])java.lang.reflect.Array.newInstance(a.getClass().getComponentType(), size);
          }
          int i = 0;
          for (Record r : values()) {
              a[i++] = (T) r;
          }
          return a;
      }
docs: {@inheritDoc}