Here you can find the source of containsAny(Collection
Parameter | Description |
---|---|
elements | a parameter |
public static boolean containsAny(Collection<Integer> set, Iterable<Integer> elements)
//package com.java2s; /******************************************************************************* * Caleydo - Visualization for Molecular Biology - http://caleydo.org * Copyright (c) The Caleydo Team. All rights reserved. * Licensed under the new BSD license, available at http://caleydo.org/license *******************************************************************************/ import java.util.Collection; public class Main { /**//from www .j a v a2 s .c o m * @param elements * @return */ public static boolean containsAny(Collection<Integer> set, Iterable<Integer> elements) { if (set == null) return false; for (Integer elem : elements) if (set.contains(elem)) return true; return false; } }