TypeUtil

Kind of class:class
Inherits from:none
Version:05/12/07
Author:Aaron Clinger, David Nelson
Classpath:org.casalib.util.TypeUtil
File last modified:Monday, 01 December 2008, 13:34:40
Utilities for determining an object's type.

Summary


Class methods
  • getTypeOf (obj:Object) : String
    • Evaluates an object and returns a string describing its type.
  • isTypeOf (obj:Object, type:String) : Boolean
    • Evaluates if an object is of a certain type.

Class methods

getTypeOf

static function getTypeOf (
obj:Object) : String

Evaluates an object and returns a string describing its type. This method is more versed than the typeof equivalent.
Parameters:
obj:
Object to evaluate.
Returns:
  • Returns a string describing the objects type.
Usage note:

isTypeOf

static function isTypeOf (
obj:Object, type:String) : Boolean

Evaluates if an object is of a certain type. Can detect any types that getTypeOf can describe.
Parameters:
obj :
Object to evaluate.
type:
String describe the objects type.
Returns:
  • Returns true if object matches type; otherwise false.