Java List Null Empty getNonNull(List list)

Here you can find the source of getNonNull(List list)

Description

get Non Null

License

LGPL

Declaration

public static <T> List<T> getNonNull(List<T> list) 

Method Source Code

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

import java.util.Collections;
import java.util.List;

public class Main {
    public static <T> List<T> getNonNull(List<T> list) {
        if (list == null) {
            return Collections.emptyList();
        }//  ww  w . ja  va2s  .c  o m
        return list;
    }
}

Related

  1. fillUpWithNulls(List list)
  2. getEmptyList(Class cls)
  3. getEmptyList(Class tClass)
  4. getIgnoreNull(List list, int n)
  5. getListIgnoringNulls(T[] items)
  6. getNotNullCount(List list)
  7. getNotNullId(final List idList)
  8. getScreen_BL_NONNULL(List searchableFields)
  9. getSearchTermIndexLocationsOrNull(final List pageWords, final String searchTerm)

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