All Downloads are FREE. Search and download functionalities are using the official Maven repository.

science.aist.jack.collection.CollectionUtils Maven / Gradle / Ivy

There is a newer version: 2.3.1
Show newest version
/*
 * Copyright (c) 2020 the original author or authors.
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */

package science.aist.jack.collection;

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

/**
 * 

Util class for {@link java.util.Collection} and {@link java.lang.Iterable}

* * @author Christoph Praschl * @since 2.0 */ public class CollectionUtils { private CollectionUtils() { } /** * @param collection to check * @return true iff collection is null or empty else false */ public static boolean isNullOrEmpty(Collection collection) { return collection == null || collection.isEmpty(); } /** * @param map to check * @return true iff collection is null or empty else false */ public static boolean isNullOrEmpty(Map map) { return map == null || map.isEmpty(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy