code: public KeySnapshot filter(KVFilter kvf){
      ArrayList<KeyInfo> res = new ArrayList<>();
      for(KeyInfo kinfo: _keyInfos)
        if(kvf.filter(kinfo))res.add(kinfo);
      return new KeySnapshot(res.toArray(new KeyInfo[res.size()]));
    }
docs: Filter the snapshot providing custom filter.
  Only the keys for which filter returns true will be present in the new snapshot.
  @param kvf The filter
  @return filtered snapshot