TypeUtil
| Kind of class: | class |
|---|---|
| Inherits from: | none |
| Version: | 05/12/07 |
| Author: | Aaron Clinger, David Nelson |
| Classpath: | org.casaframework.util.TypeUtil |
| File last modified: | Sunday, 19 August 2007, 13:43:36 |
Utilities for determining an object's 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:
org.casaframework.textfield.CoreTextField and org.casaframework.movieclip.CoreMovieClip will return types of
"textfield" and "movieclip" respectively.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.