code: public static Object concat(List<?> lhs, List<?> rhs) {
          List<Object> list = lhs instanceof Queue
                          ? new LinkedList<>(lhs)
                          : new ArrayList<>(lhs);
          list.addAll(rhs);
          return list;
      }
docs: Concatenate two lists.
  @param lhs 1st list
  @param rhs 2nd list
  @return a new list instance of concatenated contents.