Java Collection Null nullSafe(Collection collection)

Here you can find the source of nullSafe(Collection collection)

Description

null Safe

License

Apache License

Declaration

public static <T> Collection<T> nullSafe(Collection<T> collection) 

Method Source Code

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

import java.util.*;

public class Main {
    public static <T> Collection<T> nullSafe(Collection<T> collection) {
        return collection == null ? Collections.emptyList() : collection;
    }/*w w w.java  2  s.c o m*/
}

Related

  1. isNull(Collection collection)
  2. isNull(Collection c)
  3. isNull(Collection collection)
  4. isNull(Collection collection)
  5. isNull(Collection collection)
  6. nullSafe(Collection collection)
  7. nullSafe(Collection in)
  8. nullSafeCollection(Collection source)
  9. nullSafeSize(Collection collection)