This example will demonstrate various methods available in the Guava Boolean static utility.
Array contains
Passing in an array Booleans.contains will return true if any element in the primitive boolean array contains the target or in this case true.
Find index of element
Calling the Booleans.indexOf will return the first occurrence of value target, false, in the array.
Combine two boolean arrays
This snippet will concatenate two boolean arrays together by calling Booleans.concat.
Convert primitive array to list
This snippet will convert a primitive array to ArrayList of Booleans.
Convert list to primitive array
This snippet will convert an ArrayList of Booleans to a primitive boolean array.
Count number of booleans
Similar to behavior demonstrated in count occurrence of booleans in arraylist, this snippet will use Booleans.countTrue to return the number of true values contained in the array.
Join array elements as string
This snippet will join array elements with a delimiter by calling Booleans.join.