Java List Max max(List booleans)

Here you can find the source of max(List booleans)

Description

Returns the max boolean in the booleans list.

License

Open Source License

Parameter

Parameter Description
booleans the booleans to calculate the max.

Return

the max boolean in the booleans list.

Declaration

public static boolean max(List<Boolean> booleans) 

Method Source Code


//package com.java2s;
import java.util.List;

public class Main {
    /**/*from w  w  w  . java  2 s  .  c om*/
     * Returns the max boolean in the booleans list.
     *
     * @param booleans the booleans to calculate the max.
     * @return the max boolean in the booleans list.
     */
    public static boolean max(List<Boolean> booleans) {
        for (boolean value : booleans) {
            if (value) {
                return true;
            }
        }
        return false;
    }
}

Related

  1. getMaxValue(List list)
  2. getMaxValue(List values)
  3. max(final List aList, final Double aDefalut)
  4. max(List values)
  5. max(List a, List b)
  6. max(List a)
  7. max(List data)
  8. max(List l)
  9. max(List liste)