code: public static <T> List<T> iterToList(final Iterable<T> it) {
          if (it instanceof List) {
              return (List<T>) it;
          }
          if (it == null) {
              return null;
          }
  
          final List<T> ar = new ArrayList<T>();
          for (final T o : it) {
              ar.add(o);
          }
  
          return ar;
      }
docs: Converts an Iterable to a List
  
  @param it  the Iterable
  @param <T> the types of the elements in the Iterable
  @return the List