Ensures a given expression of type Char is a literal with a valid value according to a given validation function.
Ensures a given expression of type Char is a literal with a valid value according to a given validation function.
If the given Char expression is a literal whose value satisfies the given validation function, this method will
return normally. Otherwise, if the given Char expression is not a literal, this method will complete abruptly with
an exception whose detail message includes the String passed as notLiteralMsg. Otherwise, the
given Char expression is a literal that does not satisfy the given validation function, so this method will
complete abruptly with an exception whose detail message includes the String passed as notValidMsg.
This method is intended to be invoked at compile time from macros. When called from a macro, exceptions thrown by this method will result in compiler errors. The detail message of the thrown exception will appear as the compiler error message.
the compiler context for this assertion
the Char expression to validate
a String message to include in the exception thrown if the expression is a literal, but not valid
a String message to include in the exception thrown if the expression is not a literal
a function used to validate a literal value parsed from the given expression
Ensures a given expression of type Double is a literal with a valid value according to a given validation function.
Ensures a given expression of type Double is a literal with a valid value according to a given validation function.
If the given Double expression is a literal whose value satisfies the given validation function, this method will
return normally. Otherwise, if the given Double expression is not a literal, this method will complete abruptly with
an exception whose detail message includes the String passed as notLiteralMsg. Otherwise, the
given Double expression is a literal that does not satisfy the given validation function, so this method will
complete abruptly with an exception whose detail message includes the String passed as notValidMsg.
This method is intended to be invoked at compile time from macros. When called from a macro, exceptions thrown by this method will result in compiler errors. The detail message of the thrown exception will appear as the compiler error message.
the compiler context for this assertion
the Double expression to validate
a String message to include in the exception thrown if the expression is a literal, but not valid
a String message to include in the exception thrown if the expression is not a literal
a function used to validate a literal value parsed from the given expression
Ensures a given expression of type Float is a literal with a valid value according to a given validation function.
Ensures a given expression of type Float is a literal with a valid value according to a given validation function.
If the given Float expression is a literal whose value satisfies the given validation function, this method will
return normally. Otherwise, if the given Float expression is not a literal, this method will complete abruptly with
an exception whose detail message includes the String passed as notLiteralMsg. Otherwise, the
given Float expression is a literal that does not satisfy the given validation function, so this method will
complete abruptly with an exception whose detail message includes the String passed as notValidMsg.
This method is intended to be invoked at compile time from macros. When called from a macro, exceptions thrown by this method will result in compiler errors. The detail message of the thrown exception will appear as the compiler error message.
the compiler context for this assertion
the Float expression to validate
a String message to include in the exception thrown if the expression is a literal, but not valid
a String message to include in the exception thrown if the expression is not a literal
a function used to validate a literal value parsed from the given expression
Ensures a given expression of type Int is a literal with a valid value according to a given validation function.
Ensures a given expression of type Int is a literal with a valid value according to a given validation function.
If the given Int expression is a literal whose value satisfies the given validation function, this method will
return normally. Otherwise, if the given Int expression is not a literal, this method will complete abruptly with
an exception whose detail message includes the String passed as notLiteralMsg. Otherwise, the
given Int expression is a literal that does not satisfy the given validation function, so this method will
complete abruptly with an exception whose detail message includes the String passed as notValidMsg.
This method is intended to be invoked at compile time from macros. When called from a macro, exceptions thrown by this method will result in compiler errors. The detail message of the thrown exception will appear as the compiler error message.
the compiler context for this assertion
the Int expression to validate
a String message to include in the exception thrown if the expression is a literal, but not valid
a String message to include in the exception thrown if the expression is not a literal
a function used to validate a literal value parsed from the given expression
Ensures a given expression of type Long is a literal with a valid value according to a given validation function.
Ensures a given expression of type Long is a literal with a valid value according to a given validation function.
If the given Long expression is a literal whose value satisfies the given validation function, this method will
return normally. Otherwise, if the given Long expression is not a literal, this method will complete abruptly with
an exception whose detail message includes the String passed as notLiteralMsg. Otherwise, the
given Long expression is a literal that does not satisfy the given validation function, so this method will
complete abruptly with an exception whose detail message includes the String passed as notValidMsg.
This method is intended to be invoked at compile time from macros. When called from a macro, exceptions thrown by this method will result in compiler errors. The detail message of the thrown exception will appear as the compiler error message.
the compiler context for this assertion
the Long expression to validate
a String message to include in the exception thrown if the expression is a literal, but not valid
a String message to include in the exception thrown if the expression is not a literal
a function used to validate a literal value parsed from the given expression
Ensures a given expression of type String is a literal with a valid value according to a given validation function.
Ensures a given expression of type String is a literal with a valid value according to a given validation function.
If the given String expression is a literal whose value satisfies the given validation function, this method will
return normally. Otherwise, if the given String expression is not a literal, this method will complete abruptly with
an exception whose detail message includes the String passed as notLiteralMsg. Otherwise, the
given String expression is a literal that does not satisfy the given validation function, so this method will
complete abruptly with an exception whose detail message includes the String passed as notValidMsg.
This method is intended to be invoked at compile time from macros. When called from a macro, exceptions thrown by this method will result in compiler errors. The detail message of the thrown exception will appear as the compiler error message.
the compiler context for this assertion
the String expression to validate
a String message to include in the exception thrown if the expression is a literal, but not valid
a String message to include in the exception thrown if the expression is not a literal
a function used to validate a literal value parsed from the given expression
Companion object that facilitates the importing of
CompileTimeAssertionsmembers as an alternative to mixing in the trait.