protected static void validateBool ( String opName , SDVariable v1 , SDVariable v2 ) { if ( v1 . dataType ( ) != DataType . BOOL || v2 . dataType ( ) != DataType . BOOL ) throw new IllegalStateException ( "Cannot perform operation \"" + opName + "\" on variables \"" + v1 . getVarName ( ) + "\" and \"" + v2 . getVarName ( ) + "\" if one or both variables are non-boolean: " + v1 . dataType ( ) + " and " + v2 . dataType ( ) ) ; }
Validate that the operation is being applied on boolean SDVariables