src/Pure/library.scala
changeset 77367 d27d1224c67f
parent 77007 19a7046f90f9
child 77372 44fe9fe96130
equal deleted inserted replaced
77366:8d6ba14f9d22 77367:d27d1224c67f
   281     if (s == null || s == "") None else Some(s)
   281     if (s == null || s == "") None else Some(s)
   282 
   282 
   283   def proper_list[A](list: List[A]): Option[List[A]] =
   283   def proper_list[A](list: List[A]): Option[List[A]] =
   284     if (list == null || list.isEmpty) None else Some(list)
   284     if (list == null || list.isEmpty) None else Some(list)
   285 
   285 
       
   286   def if_proper[A](x: Iterable[A], body: => String): String =
       
   287     if (x == null || x.isEmpty) "" else body
       
   288 
   286 
   289 
   287   /* reflection */
   290   /* reflection */
   288 
   291 
   289   def is_subclass[A, B](a: Class[A], b: Class[B]): Boolean = {
   292   def is_subclass[A, B](a: Class[A], b: Class[B]): Boolean = {
   290     import scala.language.existentials
   293     import scala.language.existentials