Unary methods in Scala are special methods that are used to define unary operators on types. Because unary operators do not take in any arguments and operate on a single entity, declarations of such operators should not define parameters, or have parentheses either.
def unary_!(): T = {
// ...
}
def unary_! : T = {
// ...
}