NegZFiniteFloatMacro
- Source:
- NegZFiniteFloatMacro.scala
Value members
Concrete methods
Inherited methods
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.
- Value parameters:
- c
the compiler context for this assertion
- isValid
a function used to validate a literal value parsed from the given expression
- notLiteralMsg
a
String
message to include in the exception thrown if the expression is not a literal- notValidMsg
a
String
message to include in the exception thrown if the expression is a literal, but not valid- value
the
Char
expression to validate
- Inherited from:
- CompileTimeAssertions
- Source:
- CompileTimeAssertions.scala
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.
- Value parameters:
- c
the compiler context for this assertion
- isValid
a function used to validate a literal value parsed from the given expression
- notLiteralMsg
a
String
message to include in the exception thrown if the expression is not a literal- notValidMsg
a
String
message to include in the exception thrown if the expression is a literal, but not valid- value
the
Double
expression to validate
- Inherited from:
- CompileTimeAssertions
- Source:
- CompileTimeAssertions.scala
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.
- Value parameters:
- c
the compiler context for this assertion
- isValid
a function used to validate a literal value parsed from the given expression
- notLiteralMsg
a
String
message to include in the exception thrown if the expression is not a literal- notValidMsg
a
String
message to include in the exception thrown if the expression is a literal, but not valid- value
the
Float
expression to validate
- Inherited from:
- CompileTimeAssertions
- Source:
- CompileTimeAssertions.scala
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.
- Value parameters:
- c
the compiler context for this assertion
- isValid
a function used to validate a literal value parsed from the given expression
- notLiteralMsg
a
String
message to include in the exception thrown if the expression is not a literal- notValidMsg
a
String
message to include in the exception thrown if the expression is a literal, but not valid- value
the
Int
expression to validate
- Inherited from:
- CompileTimeAssertions
- Source:
- CompileTimeAssertions.scala
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.
- Value parameters:
- c
the compiler context for this assertion
- isValid
a function used to validate a literal value parsed from the given expression
- notLiteralMsg
a
String
message to include in the exception thrown if the expression is not a literal- notValidMsg
a
String
message to include in the exception thrown if the expression is a literal, but not valid- value
the
Long
expression to validate
- Inherited from:
- CompileTimeAssertions
- Source:
- CompileTimeAssertions.scala
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.
- Value parameters:
- c
the compiler context for this assertion
- isValid
a function used to validate a literal value parsed from the given expression
- notLiteralMsg
a
String
message to include in the exception thrown if the expression is not a literal- notValidMsg
a
String
message to include in the exception thrown if the expression is a literal, but not valid- value
the
String
expression to validate
- Inherited from:
- CompileTimeAssertions
- Source:
- CompileTimeAssertions.scala