class Lists {

  @NonNull public static <T> List<T> merged(@NonNull List<T> list1, @NonNull List<T> list2) {
    if (list1.isEmpty()) {
      return list2;
    } else if (list2.isEmpty()) {
      return list1;
    } else {
      final ArrayList<T> mergedList = new ArrayList<>(list1.size() + list2.size());
      mergedList.addAll(list1);
      mergedList.addAll(list2);
      return mergedList;
    }
  }

  private  Lists();

}