Java Collection Contain containsAnyVariables(Collection propertyValues)

Here you can find the source of containsAnyVariables(Collection propertyValues)

Description

contains Any Variables

License

Open Source License

Declaration

private static boolean containsAnyVariables(Collection<String> propertyValues) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2013 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:/*from w ww .ja v a2  s  . c om*/
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/

import java.util.Collection;

public class Main {
    private static final String VARIABLE_START = "${";

    private static boolean containsAnyVariables(Collection<String> propertyValues) {
        for (String propertyValue : propertyValues) {
            if (propertyValue.contains(VARIABLE_START)) {
                return true;
            }
        }
        return false;
    }
}

Related

  1. containsAny(final Collection collection1, final Collection collection2)
  2. containsAny(final Collection a, final Collection b)
  3. containsAnyIgnoreCase(String string, Collection searchStrings)
  4. containsAnyNull(Collection source)
  5. containsAnyOf(String s, Collection values)
  6. containsAssignableClass( Collection> clses, Class clazz)
  7. containsAtLeastOne(Collection origin, Collection elements)
  8. containsAtleastOne(Collection left, Collection right)
  9. containsByClassName(Collection objects, String className)