code: public long[] keys() {
          long[] values = new long[size];
          int idx = 0;
          for (Entry entry : table) {
              while (entry != null) {
                  values[idx++] = entry.key;
                  entry = entry.next;
              }
          }
          return values;
      }
docs: Returns all keys in no particular order.