public Set<Long> keySet(){
  HashSet<Long> set=new HashSet<Long>();
  for (  Segment<V> s : segments) {
    set.addAll(s.keySet());
  }
  return set;
}

public Set < Long > keySet ( ) { HashSet < Long > set = new HashSet < Long > ( ) ; for ( Segment < V > s : segments ) { set . addAll ( s . keySet ( ) ) ; } return set ; }
get the set of keys for resident entries .
