Java Collection Convert toIntegerCollection(int[] ints)

Here you can find the source of toIntegerCollection(int[] ints)

Description

to Integer Collection

License

Open Source License

Declaration

public static Collection<Integer> toIntegerCollection(int[] ints) 

Method Source Code


//package com.java2s;
// it under the terms of the GNU General Public License as published by

import java.util.ArrayList;
import java.util.Collection;

public class Main {
    public static Collection<Integer> toIntegerCollection(int[] ints) {
        ArrayList<Integer> ret = new ArrayList<Integer>();
        for (int i : ints)
            ret.add(new Integer(i));
        return ret;
    }//from w  w w .  j  av  a 2 s .com
}

Related

  1. toEnumeration(final Collection collection)
  2. toEscapedStringWithDelimiters(Collection objects, String delim)
  3. toggleEntry(T entry, Collection collection)
  4. toHashSet(Collection c)
  5. toHtml(Collection collection)
  6. toJSONString(Collection collection)
  7. tokenSetString(Collection tokens)
  8. toLimitLengthString(final Collection coll, final int limit)
  9. toLowerCase(Collection values)