code: @SuppressWarnings("unchecked")
      public static <T> List<T> typedList(List<?> objects, Class<T> t) {
          if (objects == null || objects.isEmpty()) {
              return emptyList();
          }
          List<T> ret = new ArrayList<T>();
          for (final Object o : objects) {
              Class<?> oc = o.getClass();
              if (oc == t || t.isAssignableFrom(oc)) {
                  ret.add((T) o);
              }
          }
          return ret;
      }
docs: Captures all objects of type {@code <T>} contained in the provided list
  as a new checked list.
  
  @param <T> Captured type for new checked list
  @param objects List of objects
  @param t Class type to capture
  @return Checked list of type {@code T}; may be empty