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

org.opentripplanner.util.ArrayUtils Maven / Gradle / Ivy

package org.opentripplanner.util;


/**
 * This class replaces a small part of the functionality provided by ArrayUtils from Apache Commons.
 */
public class ArrayUtils {
    public static boolean contains(Object array[], Object object) {
        if (array != null) {
            if (object != null) {
                for (Object element : array) if (object.equals(element)) return true;
            } else {
                for (Object element : array) if (element == null) return true;
            }
        }
        return false;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy