Java List Create asList(Object[] array)

Here you can find the source of asList(Object[] array)

Description

Returns the list view of given array or null if array is null.

License

Open Source License

Declaration

public static List<Object> asList(Object[] array) 

Method Source Code

//package com.java2s;
/* Copyright (c) 2008 Charles Rich and Worcester Polytechnic Institute.
 * All Rights Reserved.  Use is subject to license terms.  See the file
 * "license.terms" for information on usage and redistribution of this
 * file and for a DISCLAIMER OF ALL WARRANTIES.
 *//*ww  w  . j  a va 2  s  .  com*/

import java.util.*;

public class Main {
    /**
     * Returns the list view of given array or null if array is null.
     */
    public static List<Object> asList(Object[] array) {
        return array == null ? null : Arrays.asList(array);
    }
}

Related

  1. asList(final int... values)
  2. asList(final Iterator data)
  3. asList(int[] a)
  4. asList(int[] array)
  5. asList(Iterable iteratable)
  6. asList(Object[] array)
  7. asList(T... a)
  8. asList(T... array)
  9. asList(T... elements)