code: public boolean retainAll(IntCollection ints) {
          IntIterator it = iterator();
          boolean changed = false;
          while (it.hasNext()) {
              if (!ints.contains(it.nextInt())) {
                  it.remove();
                  changed = true;
              }
          }
          return changed;
      }
docs: Retains only the elements in this set that are contained in the specified
  {@code IntSet}.