src/org/kocakosm/pitaya/util/Booleans.java
public static Boolean xor(Boolean... bools)
	{
		Parameters.checkCondition(bools.length > 0);
		boolean xor = false;
		for (Boolean bool : bools) {
			if (bool) {
				if (xor) {
					return FALSE;
				} else {
					xor = true;
				}
			}
		}
		return xor ? TRUE : FALSE;
	}
public static Boolean xor(Boolean... bools)
	{
		Parameters.checkCondition(bools.length > 0);
		boolean xor = false;
		for (Boolean bool : bools) {
			if (bool) {
				if (xor) {
					return FALSE;
				} else {
					xor = true;
				}
			}
		}
		return xor ? TRUE : FALSE;
	}
public static Boolean xor ( Boolean ... bools ) { Parameters . checkCondition ( bools . length > 0 ) ; boolean xor = false ; for ( Boolean bool : bools ) { if ( bool ) { if ( xor ) { return FALSE ; } else { xor = true ; } } } return xor ? TRUE : FALSE ; }
Performs an "exclusive or" on the given values, that is, this method
returns {@code true} if, and only if, only one of the given
{@code Boolean} values is {@code true}, and {@code false} in all
other cases.

@param bools the {@code Boolean} values.

@return the result of the "exclusive or" on the given values.

@throws NullPointerException if {@code bools} is {@code null} or if
it contains a {@code null} reference.
@throws IllegalArgumentException if {@code bools} is empty.
Performs an exclusive or on the given values that is this method returns { @code true } if and only if only one of the given { @code Boolean } values is { @code true } and { @code false } in all other cases .