Converts a list of history entities to DTOs.

@param   list  The list of entities.

@return  The list of DTOs.

@throws  WebApplicationException  If an error occurs.
183249
public static List<HistoryDTO> transformToDto(List<History> list) {
        if (list == null) {
            throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR);
        }

        List<HistoryDTO> result = new ArrayList<HistoryDTO>();

        for (History history : list) {
            result.add(transformToDto(history));
        }
        return result;
    }
1146362
@SuppressWarnings("unchecked")
    @Override
    public <T> ListResult<T> list(EntityListOperation<T> lister)
            throws ServiceException {
        lister.setProxyData(createProxyData());
        Object rawResponse = getResource(lister.getUri())
                .queryParams(lister.getQueryParameters())
                .type(lister.getContentType()).accept(lister.getAcceptType())
                .get(lister.getResponseGenericType());
        Object processedResponse = lister.processResponse(rawResponse);
        return (ListResult<T>) processedResponse;

    }
11073
public <T> List<T> cloneList(List<T> list) {
        return new ArrayList<T>(list);
    }
197497
protected IResource createFeatureListResource(List<String> list, URI uri, long lastmod) {
		JSONArray json;
		try {
			json = new JSONArray(new ArrayList<String>(dependentFeatures));
		} catch (JSONException ex) {
			return new ExceptionResource(uri, lastmod, new IOException(ex));
		}
		StringBuffer sb = new StringBuffer();
		sb.append(FEATURE_LIST_PRELUDE).append(json).append(FEATURE_LIST_PROLOGUE);
		IResource result = new StringResource(sb.toString(), uri, lastmod);
		return result;
	}
849721
public static <T> List<T> cast(List<?> list) {
    return list == null ? null : new CastingList<T>(list);
  }
59051
public static <T> List<T> immutableListView(List<T> list) {
        if (list instanceof ImmutableList<?>) {
            return list;
        }
        if (list instanceof ArrayList<?>) {
            ArrayList.class.cast(list).trimToSize();
        }
        return Collections.unmodifiableList(list);
    }
318173
public static List<Option> makeOptionList(Collection<LabelValueBean> list,
            List<Option> resultList) {
        for (LabelValueBean bean : list) {
            resultList.add(makeOption(bean));
        }
        return resultList;
    }
515945
public static List<NotificationDto> transformToDto(List<Notification> notifications) {
        if (notifications == null) {
            throw new WebApplicationException("Null entity object cannot be converted to Dto object.", Status.INTERNAL_SERVER_ERROR);
        }

        List<NotificationDto> result = new ArrayList<NotificationDto>();

        for (Notification notification : notifications) {
            result.add(transformToDto(notification));
        }
        return result;
    }
1163997
public static int removeDuplicateNodeList(List<String> list) {

        int originCount = list.size();
        // add elements to all, including duplicates
        HashSet<String> hs = new LinkedHashSet<String>();
        hs.addAll(list);
        list.clear();
        list.addAll(hs);

        return originCount - list.size();
    }
817298
public static final <S, E> Functional<S> functionalList(List<E> list) {
		return new FunctionalList<S, E>(list); 
	}
181888
public static <T,W> List<W> listSecond(List<Pair<T, W>> list) {
        ArrayList<W> ts = new ArrayList<W>();
        for (Pair<T, W> twPair : list) {
            ts.add(twPair.getSecond());
        }
        return ts;
    }
964882
private static <T> List<T> unmodifiableList(List<T> list) {
        if (list == null) {
            return Collections.emptyList();
        }
        return Collections.unmodifiableList(list);
    }
381521
public List<Entity> pageForEntityList(Entity where, Page page) throws SQLException {
		return page(where, page, EntityListHandler.create());
	}
292257
public static <T> T[] toArray(List<T> list) {
    return toArray(getClass(list.get(0)), list);
  }
371364
public static <T extends EurekaEndpoint> List<T> randomize(List<T> list) {
        List<T> randomList = new ArrayList<>(list);
        if (randomList.size() < 2) {
            return randomList;
        }
        Random random = new Random(LOCAL_IPV4_ADDRESS.hashCode());
        int last = randomList.size() - 1;
        for (int i = 0; i < last; i++) {
            int pos = random.nextInt(randomList.size() - i);
            if (pos != i) {
                Collections.swap(randomList, i, pos);
            }
        }
        return randomList;
    }
9455
public String serializeTransformList(List<Transform> list) {
        ObjectMapper om = getObjectMapper();
        try {
            return om.writeValueAsString(new ListWrappers.TransformList(list));
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
584603
public static <T> List<T> reverseNew(List<T> list) {
		final List<T> list2 = ObjectUtil.clone(list);
		return reverse(list2);
	}