class Lists {

  @NonNull public static <T> List<T> appended(@NonNull List<T> list, @NonNull T t) {
    if (list.isEmpty()) {
      return Collections.singletonList(t);
    } else {
      final ArrayList<T> finalList = new ArrayList<>(list.size() + 1);
      finalList.addAll(list);
      finalList.add(t);
      return finalList;
    }
  }

  private  Lists();

}