code: public <E extends Enum<E>> List<E> getTypeList(Class<E> clz, E[] typeList) {
          if (typeList.length > 0) {
              return new ArrayList<>(Arrays.asList(typeList));
          } else {
              return new ArrayList<>(EnumSet.allOf(clz));
          }
      }
docs: Get a list of the enums passed
  
  @param <E>
  @param clz Class of the enum
  @param typeList Array of the enums
  @return