p

Any

package Any

Package for base scala.Any type

Package Any is a natural extension of root functionality

All included types could logically be located in the root package, but moved to Any because of potential naming conflicts or to reduce root crowding

Ordering
  1. Alphabetic
Inherited
  1. Any
  2. scala.AnyRef
  3. scala.Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Method

  1. def isVoid(v: Any): Boolean

    Void check

    Void check

    This is the central way to check an instance for voidness

    Any is void only in following cases:

    • null is always void
    • String instance with 'length==0' is void
    • Array instance with 'length==0' is void
    • Short == 0 is void
    • Int == 0 is void
    • Long == 0 is void
    • Float == 0 is void
    • Double == 0 is void
    • Any instance implementing Any.Able.Void where 'isVoid==true' is void

    Note. There is a better way to run this method. isVoid shortcut is universally available on every Any instance through library

    (null: String).isVoid lp  // Prints: true
    
    "".isVoid lp              // Prints: true
    
    (\/ : Percent).isVoid lp  // Prints: true
    
    10.isVoid lp             // Prints: false
    Definition Classes
    Any
Linear Supertypes
AnyRef, Any
Source: package.scala