Java List from Array arrayToList(Comparable[] array)

Here you can find the source of arrayToList(Comparable[] array)

Description

array To List

License

Open Source License

Declaration

@SuppressWarnings("rawtypes")
    private static List<Comparable> arrayToList(Comparable[] array) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;
import java.util.List;

public class Main {
    @SuppressWarnings("rawtypes")
    private static List<Comparable> arrayToList(Comparable[] array) {
        ArrayList<Comparable> ar = new ArrayList<>();
        for (int i = 0; i < array.length; i++) {
            ar.add(array[i]);// w  w w.java2  s.  c o m
        }
        return ar;
    }
}

Related

  1. arrayToFixedSizeList(final T[] array)
  2. arrayToInSQL(String column, List list)
  3. arrayToJsonStringArr(List arr)
  4. arrayToList(@SuppressWarnings("unchecked") T... a)
  5. arrayToList(char[] charArr)
  6. arrayToList(E[] array)
  7. arrayToList(final String... array)
  8. arrayToList(int[] a)
  9. arrayToList(int[] array)

  10. HOME | Copyright © www.java2s.com 2016