java check if only one boolean is true