Java Array Empty Check isNotNullAndNotEmpty(final Object[] array)

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

Description

is Not Null And Not Empty

License

Open Source License

Declaration

public static boolean isNotNullAndNotEmpty(final Object[] array) 

Method Source Code


//package com.java2s;
import java.util.*;

public class Main {
    public static boolean isNotNullAndNotEmpty(final Collection<?> collection) {
        return !(collection == null || collection.isEmpty());
    }//www  .ja  v  a 2  s . co  m

    public static boolean isNotNullAndNotEmpty(final Object[] array) {
        return !(array == null || array.length == 0);
    }

    /**
     * Check if string is not null and not empty
     * 
     * @param value
     * @return
     */
    public static boolean isNotNullAndNotEmpty(final String value) {
        return !(value == null || value.trim().isEmpty());
    }
}

Related

  1. isNotEmpty(T[] array)
  2. isNotEmpty(T[] array)
  3. isNotEmpty(T[] array)
  4. isNotEmpty(T[] array)
  5. isNotEmpty(T[] array)
  6. isNotNullOrEmpty(T[] array)
  7. isNullOrEmpty(Object[] array)
  8. isNullOrEmpty(String[] s)
  9. isNullOrEmpty(T[] array)