Java List Copy copyNullable(List original)

Here you can find the source of copyNullable(List original)

Description

copy Nullable

License

Open Source License

Declaration

public static <T> List<T> copyNullable(List<? extends T> original) 

Method Source Code

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

import java.util.ArrayList;

import java.util.List;

public class Main {
    public static <T> List<T> copyNullable(List<? extends T> original) {
        if (original == null) {
            return null;
        }/*from  w w  w . j a v a 2 s . com*/
        return new ArrayList<>(original);
    }
}

Related

  1. copyList(List master, List slave)
  2. copyList(List original)
  3. copyList(Object object)
  4. copyListOnlySpecified(List list, int[] indexes)
  5. copyListRaw(List master, List slave)
  6. copyNullSafeMutableList(Collection list)
  7. copyObjectList(List objects)
  8. copyOf(List list)
  9. copyOf(List values)

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