Here you can find the source of max(List
Parameter | Description |
---|---|
booleans | the booleans to calculate the max. |
public static boolean max(List<Boolean> booleans)
//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; } }