Here you can find the source of arrayToList(final String... array)
Parameter | Description |
---|---|
array | the array |
public static List<String> arrayToList(final String... array)
//package com.java2s; /*/* ww w . ja va 2 s. c om*/ * DeviceUtil.java * Copyright (c) 2013, EcoFactor, All Rights Reserved. * * This software is the confidential and proprietary information of EcoFactor * ("Confidential Information"). You shall not disclose such Confidential Information and shall use * it only in accordance with the terms of the license agreement you entered into with * EcoFactor. */ import java.util.Arrays; import java.util.List; public class Main { /** * Convert Array to list. * @param array the array * @return the list */ public static List<String> arrayToList(final String... array) { return array != null ? Arrays.asList(array) : null; } }