Java Dictionary Usage isNullOrNothing(final Object[] array)

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

Description

is Null Or Nothing

License

Open Source License

Declaration

public static boolean isNullOrNothing(final Object[] array) 

Method Source Code

//package com.java2s;
/**//  ww  w .  ja  v  a2 s .  c  o m
 * @(#)CollectionUtil.java 
 * 
 * create by x_chenbiwu at 2008-3-7
 * 
 * Copyright 2008 fivemen,Inc. All rights reserved.
 * 
 * fivemen proprietary/confidential.Use is subject to license terms
 */

import java.util.Collection;
import java.util.Dictionary;
import java.util.Map;

public class Main {

    public static boolean isNullOrNothing(final Collection collection) {
        return collection == null || collection.isEmpty();
    }

    public static boolean isNullOrNothing(final Dictionary dict) {
        return dict == null || dict.isEmpty();
    }

    public static boolean isNullOrNothing(final Map map) {
        return map == null || map.isEmpty();
    }

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

Related

  1. containsKey(Dictionary dict, String key)
  2. getBoolean(Dictionary p, Object key, Boolean defaultValue)
  3. getSpringContextHeader(Dictionary headers)
  4. getState(Dictionary conf, String property)
  5. getString(Dictionary p, Object key, String defaultValue)
  6. parseRequestOption(Dictionary conf, String confParam, Map requestOptions)
  7. setDefault(Dictionary dict, String key, String value)
  8. setProperty(Dictionary properties, String key, String value)
  9. updateConfigurableListField(Dictionary properties, String propertyName)