code: static <T> ListFactory<T> arrayListFactoryWithFirstElement(final T first) {
      return new ListFactory<T>() {
        @Override List<T> newList() {
          ArrayList<T> list = Lists.arrayList();
          list.add(first);
          return list;
        }
      };
    }
docs: Returns a {@link ListFactory} that creates an {@link ArrayList} instance
  with {@code first} as the first element.