Here you can find the source of toIntegers(final List
Parameter | Description |
---|---|
longs | the longs |
public static List<Integer> toIntegers(final List<Long> longs)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { /**//from w w w.jav a 2s . co m * Converts a list of Longs to Integers * * @param longs * the longs * @return a list of Integers */ public static List<Integer> toIntegers(final List<Long> longs) { final List<Integer> ints = new ArrayList<>(); for (final Long lng : longs) { ints.add(lng.intValue()); } return ints; } }