code: public static boolean xor(final boolean... array) {
          // Validates input
          if (array == null) {
              throw new IllegalArgumentException("The Array must not be null");
          }
          if (array.length == 0) {
              throw new IllegalArgumentException("Array is empty");
          }
  
          // false if the neutral element of the xor operator
          boolean result = false;
          for (final boolean element : array) {
              result ^= element;
          }
  
          return result;
      }
docs: <p>Performs an xor on a set of booleans.</p>
  
  <pre>
  BooleanUtils.xor(true, true)   = false
  BooleanUtils.xor(false, false) = false
  BooleanUtils.xor(true, false)  = true
  </pre>
  
  @param array  an array of {@code boolean}s
  @return {@code true} if the xor is successful.
  @throws IllegalArgumentException if {@code array} is {@code null}
  @throws IllegalArgumentException if {@code array} is empty.