Java List to Array toStringArraySafe(List list)

Here you can find the source of toStringArraySafe(List list)

Description

to String Array Safe

License

LGPL

Declaration

private static String[] toStringArraySafe(List list) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import java.util.List;

public class Main {
    private static String[] toStringArraySafe(List list) {
        while (list.contains(null)) {
            list.remove(null);/*from   w w w .j a v  a2  s . c  o m*/
        }
        return ((List<String>) list).toArray(new String[list.size()]);
    }
}

Related

  1. toStringArray(List array)
  2. toStringArray(List items)
  3. toStringArray(List list)
  4. toStringArray(List list)
  5. toStringArray(List list)