public static <E>Set<E> newSetFromMap(Map<E,Boolean> map){
  if (map.isEmpty()) {
    return new SetFromMap<E>(map);
  }
  throw new IllegalArgumentException();
}

public static < E > Set < E > newSetFromMap ( Map < E , Boolean > map ) { if ( map . isEmpty ( ) ) { return new SetFromMap < E > ( map ) ; } throw new IllegalArgumentException ( ) ; }
answers a set backed by a map . and the map must be empty when this method is called .
