trait
Not[T] extends AnyRef
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
def
+(other: String): String
-
def
->[B](y: B): (Not[T], B)
-
final
def
==(arg0: Any): Boolean
-
final
def
asInstanceOf[T0]: T0
-
def
clone(): AnyRef
-
def
ensuring(cond: (Not[T]) ⇒ Boolean, msg: ⇒ Any): Not[T]
-
def
ensuring(cond: (Not[T]) ⇒ Boolean): Not[T]
-
def
ensuring(cond: Boolean, msg: ⇒ Any): Not[T]
-
def
ensuring(cond: Boolean): Not[T]
-
-
-
def
finalize(): Unit
-
def
formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
-
def
→[B](y: B): (Not[T], B)
Inherited by implicit conversion any2stringadd from
Not[T] to any2stringadd[Not[T]]
Inherited by implicit conversion StringFormat from
Not[T] to StringFormat[Not[T]]
Inherited by implicit conversion Ensuring from
Not[T] to Ensuring[Not[T]]
Inherited by implicit conversion ArrowAssoc from
Not[T] to ArrowAssoc[Not[T]]
Together with the scala
<:<
construct, the Not trait allows us to express that a type is not a subtype of another. This works in the following manner: Suppose you have typesS <: T
and a functionfoo[T]
that you only want to apply to elements of type T that are not of type S. Then you can writefoo[T](implicit notAnS: Not[S <:<T])
.TODO: Add an "ambiguous implicit" annotation to make this clearer. My scala version does not currently support this.