Java Array Value Any anyValuesTrue(boolean[] booleanArray)

Here you can find the source of anyValuesTrue(boolean[] booleanArray)

Description

any Values True

License

Open Source License

Declaration

public static boolean anyValuesTrue(boolean[] booleanArray) 

Method Source Code

//package com.java2s;
/* Mesquite source code.  Copyright 1997 and onward, W. Maddison and D. Maddison. 
    /*w w w . j  a  v  a  2  s .  com*/
    
Disclaimer:  The Mesquite source code is lengthy and we are few.  There are no doubt inefficiencies and goofs in this code. 
The commenting leaves much to be desired. Please approach this source code with the spirit of helping out.
Perhaps with your help we can be more than a few, and make Mesquite better.
    
Mesquite is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
Mesquite's web site is http://mesquiteproject.org
    
This source code and its compiled class files are free and modifiable under the terms of 
GNU Lesser General Public License.  (http://www.gnu.org/copyleft/lesser.html)
 */

public class Main {
    public static boolean anyValuesTrue(boolean[] booleanArray) {
        for (int i = 0; i < booleanArray.length; i++) {
            if (booleanArray[i])
                return true;
        }
        return false;
    }
}

Related

  1. anyNulls(Object... items)
  2. anyToDoubleOrElse(Object any, double orElse)
  3. anyToString(Object o, boolean noneNull)
  4. anyTrue(boolean[] booleans)
  5. anyTrue(boolean[] booleans)