Package org.jclouds.docker.internal
Class NullSafeCopies
- java.lang.Object
-
- org.jclouds.docker.internal.NullSafeCopies
-
public class NullSafeCopies extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E> List<E>copyOf(E[] array)static <E> List<E>copyOf(Iterable<E> list)static <E> List<E>copyOf(List<E> list)static <K,V>
Map<K,V>copyOf(Map<K,V> map)static <E> List<E>copyWithNullOf(E[] array)Copies given array into immutableListwith keeping null value if provided.static <E> List<E>copyWithNullOf(Iterable<E> iterable)static <E> List<E>copyWithNullOf(List<E> list)Copies given List with keeping null value if provided.static <K,V>
Map<K,V>copyWithNullOf(Map<K,V> map)Copies given Map with keeping null value if provided.
-
-
-
Method Detail
-
copyWithNullOf
public static <E> List<E> copyWithNullOf(@Nullable List<E> list)
Copies given List with keeping null value if provided.- Parameters:
list- instance to copy (maybenull)- Returns:
- if the parameter is not-
nullthen immutable copy;nullotherwise
-
copyWithNullOf
public static <K,V> Map<K,V> copyWithNullOf(@Nullable Map<K,V> map)
Copies given Map with keeping null value if provided.- Parameters:
map- instance to copy (maybenull)- Returns:
- if the parameter is not-
nullthen immutable copy;nullotherwise
-
copyWithNullOf
public static <E> List<E> copyWithNullOf(@Nullable Iterable<E> iterable)
- Parameters:
iterable- instance to copy (maybenull)- Returns:
- if the parameter is not-
nullthen immutable copy;nullotherwise
-
-