code: @SuppressWarnings("unchecked")
      public <K> K[] getKeys(Map<K, ?> map) {
          K[] result = null;
          Set<K> keySet = map.keySet();
          if (keySet.size() > 0) {
              result = (K[]) keySet.toArray(new Object[keySet.size()]);
          }
          
          return result;
      }
docs: Get the array of all keys in the given map.
  
  @param <K> The component type of the keys
  
  @param map The map to get the keys from
  
  @return The array of all keys in the map