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

microsoft.exchange.webservices.data.ComparisonHelpers Maven / Gradle / Ivy

Go to download

The source came from http://archive.msdn.microsoft.com/ewsjavaapi Support for Maven has been added.

The newest version!
/**************************************************************************
 * copyright file="AttendeeCollection.java" company="Microsoft"
 *     Copyright (c) Microsoft Corporation.  All rights reserved.
 * 
 * Defines the ComparisonHelpers.java.
**************************************************************************/
package microsoft.exchange.webservices.data;

import java.util.ArrayList;

/***
 * Represents a set of helper methods for performing string comparisons.
 */
class ComparisonHelpers {

	/***
	 * Case insensitive check if the collection contains the string.
	 * @param collectionThe collection of objects, only strings are checked
	 * @param match String to match
	 * @return true, if match contained in the collection
	 */
	 protected static boolean caseInsensitiveContains(ArrayList collection, 
			 String match) {
         for(Object obj :collection) {
             String str = (String)obj;
             if (str != null) {
                 if (str.equalsIgnoreCase(match)) {
                     return true;
                 }
             }
         }

         return false;
     }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy